1800 |
How can I highlight somehow the child bars of a summary bar
exg2antt1.BeginUpdate(); exg2antt1.Columns.Add("Task"); exontrol.EXG2ANTTLib.Chart var_Chart = exg2antt1.Chart; var_Chart.set_PaneWidth(false,128); var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.Bars["Task"].Color = Color.FromArgb(240,240,240); exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; int hSummary = var_Items.AddItem("Summary"); var_Items.AddBar(hSummary,"Project Summary",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"",null); int hTask = var_Items.InsertItem(hSummary,null,"Task A"); var_Items.AddBar(hTask,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); hTask = var_Items.InsertItem(hSummary,null,"Task B"); var_Items.AddBar(hTask,"Task",Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2",null); hTask = var_Items.InsertItem(hSummary,null,"Task C"); var_Items.AddBar(hTask,"Task",Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/10/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K3",null); var_Items.set_ExpandItem(hSummary,true); var_Items.DefineSummaryBars(hSummary,"",-1,"<*>"); var_Items.set_ItemBar(hSummary,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exSummaryBarBackColor,65536); var_Items.set_ItemBar(hSummary,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exSummaryBarBackColorTransparent,50); exg2antt1.EndUpdate(); |
1799 |
How do I change the color for the selected bars, without showing the frame arround
exg2antt1.BeginUpdate(); exontrol.EXG2ANTTLib.Chart var_Chart = exg2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2002",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.SelBarColor32 = 0x7f0000ff; var_Chart.set_PaneWidth(false,48); exg2antt1.Columns.Add("Task"); exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; var_Items.AddBar(var_Items.AddItem("Task 1"),"Task",Convert.ToDateTime("1/2/2002",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2002",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A",null); var_Items.AddBar(var_Items.AddItem("Task 2"),"Task",Convert.ToDateTime("1/6/2002",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/10/2002",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"B",null); var_Items.AddBar(var_Items.AddItem("Task 3"),"Task",Convert.ToDateTime("1/11/2002",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/14/2002",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"C",null); var_Items.set_ItemBar(0,"<A B>",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarSelected,true); exg2antt1.EndUpdate(); |
1798 |
Is it possible to enumerate the activities/bars of critical path
// BarResize event - Occurs when a bar is moved or resized. private void exg2antt1_BarResize(object sender,int Item,object Key) { exg2antt1.Items.SchedulePDM(Item,Key); } //this.exg2antt1.BarResize += new exontrol.EXG2ANTTLib.exg2antt.BarResizeEventHandler(this.exg2antt1_BarResize); exg2antt1.BeginUpdate(); exg2antt1.Columns.Add("Tasks"); exontrol.EXG2ANTTLib.Chart var_Chart = exg2antt1.Chart; var_Chart.LevelCount = 2; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,96); var_Chart.Bars["Task"].set_Def(exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption,"<%=int(%269) > 0 ? (`<b>` + %269 + `</b>`) : ``%>"); exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; int hSummary1 = var_Items.AddItem("Summary"); var_Items.set_ItemBold(hSummary1,true); var_Items.AddBar(hSummary1,"Summary",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"sum",null); int h1 = var_Items.AddItem("Task 1"); var_Items.AddBar(h1,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.DefineSummaryBars(hSummary1,"sum",h1,""); int h2 = var_Items.AddItem("Task 2"); var_Items.AddBar(h2,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.DefineSummaryBars(hSummary1,"sum",h2,""); var_Items.AddLink("L1",h1,"",h2,""); int h3 = var_Items.AddItem("Task 3"); var_Items.AddBar(h3,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.DefineSummaryBars(hSummary1,"sum",h3,""); var_Items.AddLink("L2",h2,"",h3,""); int h4 = var_Items.AddItem("Task 4"); var_Items.AddBar(h4,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.DefineSummaryBars(hSummary1,"sum",h4,""); var_Items.AddLink("L3",h1,"",h4,""); var_Items.set_DefSchedulePDM(exontrol.EXG2ANTTLib.DefSchedulePDMEnum.exPDMCriticalPathBarColor,65280); var_Items.SchedulePDM(h1,""); exg2antt1.EndUpdate(); |
1797 |
How can I add a SF link
exg2antt1.BeginUpdate(); exg2antt1.Columns.Add("Task"); exontrol.EXG2ANTTLib.Chart var_Chart = exg2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("12/25/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,48); var_Chart.LevelCount = 2; exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; int h1 = var_Items.AddItem("Task 1"); var_Items.AddBar(h1,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); int h2 = var_Items.AddItem("Task 2"); var_Items.AddBar(h2,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2",null); int h3 = var_Items.AddItem("Task 3"); var_Items.AddBar(h3,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K3",null); int h4 = var_Items.AddItem("Task 4"); var_Items.AddBar(h4,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K4",null); int h5 = var_Items.AddItem("Task 5"); var_Items.AddBar(h5,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K5",null); var_Items.AddLink("L1",h1,"K1",h2,"K2"); var_Items.AddLink("L2",h2,"K2",h3,"K3"); var_Items.AddLink("L3",h3,"K3",h4,"K4"); var_Items.AddLink("L4",h4,"K4",h5,"K5"); var_Items.set_Link("L4",exontrol.EXG2ANTTLib.LinkPropertyEnum.exLinkStartPos,0); var_Items.set_Link("L4",exontrol.EXG2ANTTLib.LinkPropertyEnum.exLinkEndPos,2); var_Items.set_Link("L4",exontrol.EXG2ANTTLib.LinkPropertyEnum.exLinkColor,65280); var_Items.SchedulePDM(0,"K5"); exg2antt1.Chart.ShowLinks = exontrol.EXG2ANTTLib.ShowExtendedLinksEnum.exShowExtendedLinks; exg2antt1.EndUpdate(); |
1796 |
How do I get the Start and End date of a bar
exg2antt1.BeginUpdate(); exg2antt1.Columns.Add("Tasks"); exg2antt1.Debug = true; exontrol.EXG2ANTTLib.Chart var_Chart = exg2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("9/20/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.LevelCount = 2; var_Chart.set_PaneWidth(false,96); exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; var_Items.AddBar(var_Items.AddItem("Task 1"),"Task",Convert.ToDateTime("9/21/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("9/24/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); var_Items.AddBar(var_Items.AddItem("Task 2"),"Task",Convert.ToDateTime("9/22/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("9/25/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2",null); var_Items.AddBar(var_Items.AddItem("Task 3"),"Task",Convert.ToDateTime("9/23/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("9/26/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K3",null); int h = var_Items[1]; var_Items.set_ItemBold(h,true); System.Diagnostics.Debug.Print( "Start of " ); System.Diagnostics.Debug.Print( var_Items.get_FirstItemBar(h).ToString() ); System.Diagnostics.Debug.Print( var_Items.get_ItemBar(h,var_Items.get_FirstItemBar(h),exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarStart).ToString() ); System.Diagnostics.Debug.Print( "End of " ); System.Diagnostics.Debug.Print( var_Items.get_FirstItemBar(h).ToString() ); System.Diagnostics.Debug.Print( var_Items.get_ItemBar(h,var_Items.get_FirstItemBar(h),exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarEnd).ToString() ); exg2antt1.EndUpdate(); |
1795 |
I haven't found options to change/localize (in German, or my current regional settings) the captions/text/strings ( dates, tooltip ) that shows in the chart area (method 2)
exontrol.EXG2ANTTLib.Chart var_Chart = exg2antt1.Chart; var_Chart.FirstWeekDay = var_Chart.LocFirstWeekDay; var_Chart.MonthNames = var_Chart.LocMonthNames; var_Chart.WeekDays = var_Chart.LocWeekDays; var_Chart.AMPM = var_Chart.LocAMPM; var_Chart.LevelCount = 2; var_Chart.set_PaneWidth(false,0); var_Chart.UnitScale = exontrol.EXG2ANTTLib.UnitEnum.exDay; |
1794 |
Is it possible to change caption of the print and print preview, as it just says "Untitled Document", but I cant find the code that writes this caption
exg2antt1.BeginUpdate(); exg2antt1.Columns.Add("Task"); exg2antt1.Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; int h1 = var_Items.AddItem("Task 1"); var_Items.AddBar(h1,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); int h2 = var_Items.AddItem("Task 2"); var_Items.AddBar(h2,"Task",Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2",null); var_Items.AddLink("L1",h1,"K1",h2,"K2"); exg2antt1.EndUpdate(); // Add 'exontrol.exprint.dll(ExPrint.dll)' reference to your project. // Add 'ExPrint 1.0 Control Library(ExPrint.dll)' reference to your project. exontrol.EXPRINTLib.exprint var_Print = new exontrol.EXPRINTLib.exprint(); var_Print.Caption = "This is your new caption for print and print preview"; var_Print.AutoRelease = false; var_Print.PrintExt = (exg2antt1 as exontrol.EXG2ANTTLib.exg2antt); var_Print.Preview(); |
1793 |
Is it possible to specify the A4 paper size for the print preview
exg2antt1.BeginUpdate(); exg2antt1.Columns.Add("Task"); exg2antt1.Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; int h1 = var_Items.AddItem("Task 1"); var_Items.AddBar(h1,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); int h2 = var_Items.AddItem("Task 2"); var_Items.AddBar(h2,"Task",Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2",null); var_Items.AddLink("L1",h1,"K1",h2,"K2"); exg2antt1.EndUpdate(); // Add 'exontrol.exprint.dll(ExPrint.dll)' reference to your project. // Add 'ExPrint 1.0 Control Library(ExPrint.dll)' reference to your project. exontrol.EXPRINTLib.exprint var_Print = new exontrol.EXPRINTLib.exprint(); var_Print.set_Settings(exontrol.EXPRINTLib.FieldsEnum.exPaperSize,9); var_Print.AutoRelease = false; var_Print.PrintExt = (exg2antt1 as exontrol.EXG2ANTTLib.exg2antt); var_Print.Preview(); |
1792 |
Is it possible to tell the print preview to open up in "landscape mode" by default, not in "portrait mode"
exg2antt1.BeginUpdate(); exg2antt1.Columns.Add("Task"); exg2antt1.Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; int h1 = var_Items.AddItem("Task 1"); var_Items.AddBar(h1,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); int h2 = var_Items.AddItem("Task 2"); var_Items.AddBar(h2,"Task",Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2",null); var_Items.AddLink("L1",h1,"K1",h2,"K2"); exg2antt1.EndUpdate(); // Add 'exontrol.exprint.dll(ExPrint.dll)' reference to your project. // Add 'ExPrint 1.0 Control Library(ExPrint.dll)' reference to your project. exontrol.EXPRINTLib.exprint var_Print = new exontrol.EXPRINTLib.exprint(); var_Print.PageOrientation = exontrol.EXPRINTLib.PageOrientationEnum.exLandscape; var_Print.AutoRelease = false; var_Print.PrintExt = (exg2antt1 as exontrol.EXG2ANTTLib.exg2antt); var_Print.Preview(); |
1791 |
How do I prevent a caption outside the bar from overlapping other bars
exg2antt1.BeginUpdate(); exg2antt1.ScrollBySingleLine = true; exg2antt1.Columns.Add("Task"); exontrol.EXG2ANTTLib.Chart var_Chart = exg2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,48); var_Chart.Bars.Copy("Task","Default-Task"); var_Chart.Bars["Task"].OverlaidType = exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsIncludeCaption | exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange | exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack; exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; int h = var_Items.AddItem("Task 1"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A1","task"); var_Items.set_ItemBar(h,"A1",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,18); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/10/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A2","task"); var_Items.set_ItemBar(h,"A2",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,16); h = var_Items.AddItem("Task 2"); var_Items.AddBar(h,"Default-Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A1","task"); var_Items.set_ItemBar(h,"A1",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,18); var_Items.AddBar(h,"Default-Task",Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/10/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A2","task"); var_Items.set_ItemBar(h,"A2",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,16); exg2antt1.EndUpdate(); |
1790 |
How do I clip/hide/align the bar's extra-caption/text based on the bar's size/width/length
exg2antt1.BeginUpdate(); exg2antt1.Columns.Add("Clip"); exg2antt1.ScrollBySingleLine = true; exg2antt1.DrawGridLines = exontrol.EXG2ANTTLib.GridLinesEnum.exRowLines; exontrol.EXG2ANTTLib.Chart var_Chart = exg2antt1.Chart; var_Chart.AllowResizeChart = exontrol.EXG2ANTTLib.ResizeChartEnum.exAllowResizeChartMiddle | exontrol.EXG2ANTTLib.ResizeChartEnum.exAllowResizeChartHeader; var_Chart.DrawGridLines = exontrol.EXG2ANTTLib.GridLinesEnum.exRowLines; var_Chart.FirstVisibleDate = Convert.ToDateTime("12/23/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.LevelCount = 2; var_Chart.set_PaneWidth(false,216); exontrol.EXG2ANTTLib.Bar var_Bar = var_Chart.Bars["Task"]; var_Bar.Pattern = exontrol.EXG2ANTTLib.PatternEnum.exPatternBox; var_Bar.Color = Color.FromArgb(164,164,164); var_Bar.StartColor = Color.FromArgb(240,240,240); var_Bar.EndColor = var_Bar.StartColor; var_Bar.OverlaidType = exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsIncludeCaption | exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange | exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack; var_Bar.Height = 15; var_Chart.MinUnitWidth = var_Chart.UnitWidth; exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; int h = var_Items.AddItem("no clip, (0-2)"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); var_Items.set_ItemBar(h,"K1",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaption,"no clip, right(<b>2</b>)"); var_Items.set_ItemBar(h,"K1",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaptionHAlign,2); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2",null); var_Items.set_ItemBar(h,"K2",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaption,"no clip, center(<b>1</b>)"); var_Items.set_ItemBar(h,"K2",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaptionHAlign,1); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K3",""); var_Items.set_ItemBar(h,"K3",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaption,"no clip, left(<b>0</b>)"); var_Items.set_ItemBar(h,"K3",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaptionHAlign,0); h = var_Items.AddItem("clip, inside (3-5)"); var_Items.AddBar(h,"Task",Convert.ToDateTime("12/28/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); var_Items.set_ItemBar(h,"K1",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaption,"clip, inside, right(<b>5</b>)"); var_Items.set_ItemBar(h,"K1",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaptionHAlign,5); var_Items.AddBar(h,"Task",Convert.ToDateTime("12/28/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2",null); var_Items.set_ItemBar(h,"K2",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaption,"clip, inside, center(<b>4</b>)"); var_Items.set_ItemBar(h,"K2",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaptionHAlign,4); var_Items.AddBar(h,"Task",Convert.ToDateTime("12/28/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K3",null); var_Items.set_ItemBar(h,"K3",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaption,"clip, inside, left(<b>3</b>)"); var_Items.set_ItemBar(h,"K3",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaptionHAlign,3); h = var_Items.AddItem("hide on min width, clip if not fit, inside (6-8)"); var_Items.AddBar(h,"Task",Convert.ToDateTime("12/26/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/10/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); var_Items.set_ItemBar(h,"K1",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaption,"hide on min width, clip if not fit, inside, right(<b>8</b>)"); var_Items.set_ItemBar(h,"K1",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaptionHAlign,8); var_Items.AddBar(h,"Task",Convert.ToDateTime("12/26/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/10/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2",null); var_Items.set_ItemBar(h,"K2",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaption,"hide on min width, clip if not fit, inside, center(<b>7</b>)"); var_Items.set_ItemBar(h,"K2",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaptionHAlign,7); var_Items.AddBar(h,"Task",Convert.ToDateTime("12/26/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/10/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K3",null); var_Items.set_ItemBar(h,"K3",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaption,"hide on min width, clip if not fit, inside, left(<b>6</b>)"); var_Items.set_ItemBar(h,"K3",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaptionHAlign,6); h = var_Items.AddItem("hide if not fit, no clip, inside (9-11)"); var_Items.AddBar(h,"Task",Convert.ToDateTime("12/28/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); var_Items.set_ItemBar(h,"K1",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaption,"hide if not fit, no clip, inside, right(<b>11</b>)"); var_Items.set_ItemBar(h,"K1",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaptionHAlign,11); var_Items.AddBar(h,"Task",Convert.ToDateTime("12/28/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2",null); var_Items.set_ItemBar(h,"K2",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaption,"hide if not fit, no clip, center(<b>10</b>)"); var_Items.set_ItemBar(h,"K2",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaptionHAlign,10); var_Items.AddBar(h,"Task",Convert.ToDateTime("12/28/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K3",null); var_Items.set_ItemBar(h,"K3",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaption,"hide if not fit, no clip, inside, left(<b>9</b>)"); var_Items.set_ItemBar(h,"K3",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaptionHAlign,9); h = var_Items.AddItem("no clip, inside, outside (12-14)"); var_Items.AddBar(h,"Task",Convert.ToDateTime("12/28/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); var_Items.set_ItemBar(h,"K1",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaption,"no clip, inside, outside, right(<b>14</b>)"); var_Items.set_ItemBar(h,"K1",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaptionHAlign,14); var_Items.AddBar(h,"Task",Convert.ToDateTime("12/28/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2",null); var_Items.set_ItemBar(h,"K2",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaption,"no clip, inside, outside, center(<b>13</b>)"); var_Items.set_ItemBar(h,"K2",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaptionHAlign,13); var_Items.AddBar(h,"Task",Convert.ToDateTime("12/28/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K3",null); var_Items.set_ItemBar(h,"K3",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaption,"no clip, inside, outside, left(<b>12</b>)"); var_Items.set_ItemBar(h,"K3",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaptionHAlign,12); h = var_Items.AddItem("no clip, outside (16-18)"); var_Items.AddBar(h,"Task",Convert.ToDateTime("12/30/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); var_Items.set_ItemBar(h,"K1",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaption,"no clip, outside, right(<b>18</b>)"); var_Items.set_ItemBar(h,"K1",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaptionHAlign,18); var_Items.AddBar(h,"Task",Convert.ToDateTime("12/30/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2",null); var_Items.set_ItemBar(h,"K2",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaption,"no clip, outside, center(<b>17</b>)"); var_Items.set_ItemBar(h,"K2",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaptionHAlign,17); var_Items.AddBar(h,"Task",Convert.ToDateTime("12/30/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K3",null); var_Items.set_ItemBar(h,"K3",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaption,"no clip, outside, left(<b>16</b>)"); var_Items.set_ItemBar(h,"K3",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaptionHAlign,16); exg2antt1.EndUpdate(); |
1789 |
What options do I have to show the links between bars (rectangular SEV, starts vertically, ends vertically)
exg2antt1.BeginUpdate(); exg2antt1.AntiAliasing = true; exg2antt1.Columns.Add("Task"); exontrol.EXG2ANTTLib.Chart var_Chart = exg2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,128); var_Chart.NonworkingDays = 0; var_Chart.LinksWidth = 2; exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; var_Items.AddItem(""); int h3 = var_Items.AddItem("Task 3"); var_Items.AddItem(""); var_Items.AddBar(h3,"Task",Convert.ToDateTime("1/13/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/15/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K3",null); int h1 = var_Items.AddItem("Task 1"); var_Items.AddItem(""); var_Items.AddBar(h1,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); int h2 = var_Items.AddItem("Task 2"); var_Items.AddBar(h2,"Task",Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/9/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2",null); var_Items.AddItem(""); var_Items.AddLink("L1",h1,"K1",h2,"K2"); var_Items.AddLink("L2",h2,"K2",h3,"K3"); var_Items.set_Link("<*>",exontrol.EXG2ANTTLib.LinkPropertyEnum.exLinkShowRound,5); exg2antt1.EndUpdate(); |
1788 |
What options do I have to show the links between bars (rectangular SV, starts vertically, ends horizontally)
exg2antt1.BeginUpdate(); exg2antt1.AntiAliasing = true; exg2antt1.Columns.Add("Task"); exontrol.EXG2ANTTLib.Chart var_Chart = exg2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,128); var_Chart.NonworkingDays = 0; var_Chart.LinksWidth = 2; exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; var_Items.AddItem(""); int h3 = var_Items.AddItem("Task 3"); var_Items.AddItem(""); var_Items.AddBar(h3,"Task",Convert.ToDateTime("1/13/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/15/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K3",null); int h1 = var_Items.AddItem("Task 1"); var_Items.AddItem(""); var_Items.AddBar(h1,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); int h2 = var_Items.AddItem("Task 2"); var_Items.AddBar(h2,"Task",Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/9/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2",null); var_Items.AddItem(""); var_Items.AddLink("L1",h1,"K1",h2,"K2"); var_Items.AddLink("L2",h2,"K2",h3,"K3"); var_Items.set_Link("<*>",exontrol.EXG2ANTTLib.LinkPropertyEnum.exLinkShowRound,4); exg2antt1.EndUpdate(); |
1787 |
What options do I have to show the links between bars (rectangular EV, starts horizontally, ends vertically)
exg2antt1.BeginUpdate(); exg2antt1.AntiAliasing = true; exg2antt1.Columns.Add("Task"); exontrol.EXG2ANTTLib.Chart var_Chart = exg2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,128); var_Chart.NonworkingDays = 0; var_Chart.LinksWidth = 2; exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; var_Items.AddItem(""); int h3 = var_Items.AddItem("Task 3"); var_Items.AddItem(""); var_Items.AddBar(h3,"Task",Convert.ToDateTime("1/13/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/15/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K3",null); int h1 = var_Items.AddItem("Task 1"); var_Items.AddItem(""); var_Items.AddBar(h1,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); int h2 = var_Items.AddItem("Task 2"); var_Items.AddBar(h2,"Task",Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/9/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2",null); var_Items.AddItem(""); var_Items.AddLink("L1",h1,"K1",h2,"K2"); var_Items.AddLink("L2",h2,"K2",h3,"K3"); var_Items.set_Link("<*>",exontrol.EXG2ANTTLib.LinkPropertyEnum.exLinkShowRound,3); exg2antt1.EndUpdate(); |
1786 |
What options do I have to show the links between bars (straight)
exg2antt1.BeginUpdate(); exg2antt1.AntiAliasing = true; exg2antt1.Columns.Add("Task"); exontrol.EXG2ANTTLib.Chart var_Chart = exg2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,128); var_Chart.NonworkingDays = 0; var_Chart.LinksWidth = 2; exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; var_Items.AddItem(""); int h3 = var_Items.AddItem("Task 3"); var_Items.AddItem(""); var_Items.AddBar(h3,"Task",Convert.ToDateTime("1/13/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/15/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K3",null); int h1 = var_Items.AddItem("Task 1"); var_Items.AddItem(""); var_Items.AddBar(h1,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); int h2 = var_Items.AddItem("Task 2"); var_Items.AddBar(h2,"Task",Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/9/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2",null); var_Items.AddItem(""); var_Items.AddLink("L1",h1,"K1",h2,"K2"); var_Items.AddLink("L2",h2,"K2",h3,"K3"); var_Items.set_Link("<*>",exontrol.EXG2ANTTLib.LinkPropertyEnum.exLinkShowRound,2); exg2antt1.EndUpdate(); |
1785 |
What options do I have to show the links between bars (direct)
exg2antt1.BeginUpdate(); exg2antt1.AntiAliasing = true; exg2antt1.Columns.Add("Task"); exontrol.EXG2ANTTLib.Chart var_Chart = exg2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,128); var_Chart.NonworkingDays = 0; var_Chart.LinksWidth = 2; exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; var_Items.AddItem(""); int h3 = var_Items.AddItem("Task 3"); var_Items.AddItem(""); var_Items.AddBar(h3,"Task",Convert.ToDateTime("1/13/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/15/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K3",null); int h1 = var_Items.AddItem("Task 1"); var_Items.AddItem(""); var_Items.AddBar(h1,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); int h2 = var_Items.AddItem("Task 2"); var_Items.AddBar(h2,"Task",Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/9/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2",null); var_Items.AddItem(""); var_Items.AddLink("L1",h1,"K1",h2,"K2"); var_Items.AddLink("L2",h2,"K2",h3,"K3"); var_Items.set_Link("<*>",exontrol.EXG2ANTTLib.LinkPropertyEnum.exLinkShowRound,1); exg2antt1.EndUpdate(); |
1784 |
What options do I have to show the links between bars (round)
exg2antt1.BeginUpdate(); exg2antt1.AntiAliasing = true; exg2antt1.Columns.Add("Task"); exontrol.EXG2ANTTLib.Chart var_Chart = exg2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,128); var_Chart.NonworkingDays = 0; var_Chart.LinksWidth = 2; exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; var_Items.AddItem(""); int h3 = var_Items.AddItem("Task 3"); var_Items.AddItem(""); var_Items.AddBar(h3,"Task",Convert.ToDateTime("1/13/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/15/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K3",null); int h1 = var_Items.AddItem("Task 1"); var_Items.AddItem(""); var_Items.AddBar(h1,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); int h2 = var_Items.AddItem("Task 2"); var_Items.AddBar(h2,"Task",Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/9/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2",null); var_Items.AddItem(""); var_Items.AddLink("L1",h1,"K1",h2,"K2"); var_Items.AddLink("L2",h2,"K2",h3,"K3"); var_Items.set_Link("<*>",exontrol.EXG2ANTTLib.LinkPropertyEnum.exLinkShowRound,-1); exg2antt1.EndUpdate(); |
1783 |
What options do I have to show the links between bars (rectangular, default)
exg2antt1.BeginUpdate(); exg2antt1.AntiAliasing = true; exg2antt1.Columns.Add("Task"); exontrol.EXG2ANTTLib.Chart var_Chart = exg2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,128); var_Chart.NonworkingDays = 0; var_Chart.LinksWidth = 2; exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; var_Items.AddItem(""); int h3 = var_Items.AddItem("Task 3"); var_Items.AddItem(""); var_Items.AddBar(h3,"Task",Convert.ToDateTime("1/13/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/15/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K3",null); int h1 = var_Items.AddItem("Task 1"); var_Items.AddItem(""); var_Items.AddBar(h1,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); int h2 = var_Items.AddItem("Task 2"); var_Items.AddBar(h2,"Task",Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/9/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2",null); var_Items.AddItem(""); var_Items.AddLink("L1",h1,"K1",h2,"K2"); var_Items.AddLink("L2",h2,"K2",h3,"K3"); var_Items.set_Link("<*>",exontrol.EXG2ANTTLib.LinkPropertyEnum.exLinkShowRound,0); exg2antt1.EndUpdate(); |
1782 |
I have a question about whether the control has the functionality to add two bars on the same item, as one would correspond to the item bar and another bar their progress, but progress is required to show dividedly at different times outside the activity bar item
exg2antt1.BeginUpdate(); exg2antt1.Columns.Add("Tasks"); exg2antt1.BackColorLevelHeader = exg2antt1.BackColor; exontrol.EXG2ANTTLib.Chart var_Chart = exg2antt1.Chart; var_Chart.LevelCount = 2; var_Chart.FirstVisibleDate = Convert.ToDateTime("9/20/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,64); exontrol.EXG2ANTTLib.Bar var_Bar = var_Chart.Bars.Copy("Progress","TProgressD"); var_Bar.set_Def(exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,18); var_Bar.Shape = exontrol.EXG2ANTTLib.ShapeBarEnum.exShapeThinDown; exontrol.EXG2ANTTLib.Bar var_Bar1 = var_Chart.Bars.Copy("Progress","TProgressC"); var_Bar1.set_Def(exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,18); exontrol.EXG2ANTTLib.Bar var_Bar2 = var_Chart.Bars.Copy("Progress","TProgressU"); var_Bar2.set_Def(exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,18); var_Bar2.Shape = exontrol.EXG2ANTTLib.ShapeBarEnum.exShapeThinUp; exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; int h = var_Items.AddItem("Task"); var_Items.AddBar(h,"Task",Convert.ToDateTime("9/25/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("9/30/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"T1",null); var_Items.AddBar(h,"TProgressU",Convert.ToDateTime("9/25/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("10/4/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"TP1",null); var_Items.GroupBars(h,"T1",true,h,"TP1",true,3,null); var_Items.set_ItemBar(h,"TP1",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption,"<font ;6>progress up"); h = var_Items.AddItem("Task"); var_Items.AddBar(h,"Task",Convert.ToDateTime("9/26/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("10/1/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"T2",null); var_Items.AddBar(h,"TProgressC",Convert.ToDateTime("9/26/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("10/5/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"TP2",null); var_Items.GroupBars(h,"T2",true,h,"TP2",true,3,null); var_Items.set_ItemBar(h,"TP2",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption,"<font ;6>progress center"); h = var_Items.AddItem("Task"); var_Items.AddBar(h,"Task",Convert.ToDateTime("9/25/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("9/30/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"T3",null); var_Items.AddBar(h,"TProgressD",Convert.ToDateTime("9/25/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("10/6/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"TP3",null); var_Items.GroupBars(h,"T3",true,h,"TP3",true,3,null); var_Items.set_ItemBar(h,"TP3",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption,"<font ;6>progress down"); exg2antt1.EndUpdate(); |
1781 |
I have a column of date-type, the question is how can I move the associated bar, instead of resizing it (summary, inclusive, working)
exg2antt1.BeginUpdate(); exg2antt1.MarkSearchColumn = false; exg2antt1.Indent = 11; exg2antt1.HasLines = exontrol.EXG2ANTTLib.HierarchyLineEnum.exSolidLine; exg2antt1.Items.AllowCellValueToItemBar = true; exontrol.EXG2ANTTLib.Columns var_Columns = exg2antt1.Columns; var_Columns.Add("Tasks"); exontrol.EXG2ANTTLib.Column var_Column = (var_Columns.Add("Start") as exontrol.EXG2ANTTLib.Column); var_Column.set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,544); var_Column.Editor.EditType = exontrol.EXG2ANTTLib.EditTypeEnum.DateType; var_Column.LevelKey = 1; exontrol.EXG2ANTTLib.Column var_Column1 = (var_Columns.Add("End") as exontrol.EXG2ANTTLib.Column); var_Column1.set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,546); var_Column1.Editor.EditType = exontrol.EXG2ANTTLib.EditTypeEnum.DateType; var_Column1.LevelKey = 1; exontrol.EXG2ANTTLib.Chart var_Chart = exg2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("9/20/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.AllowLinkBars = false; var_Chart.AllowCreateBar = exontrol.EXG2ANTTLib.CreateBarEnum.exNoCreateBar; var_Chart.LevelCount = 2; var_Chart.set_PaneWidth(false,224); exontrol.EXG2ANTTLib.Bars var_Bars = var_Chart.Bars; exontrol.EXG2ANTTLib.Bar var_Bar = var_Bars.Add("Underline"); var_Bar.Color = Color.FromArgb(0,0,255); var_Bar.Shape = exontrol.EXG2ANTTLib.ShapeBarEnum.exShapeThinDown; exontrol.EXG2ANTTLib.Bar var_Bar1 = var_Bars.Add("Task:Underline"); var_Bar1.Shortcut = "T"; var_Bar1.set_Def(exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarKeepWorkingCount,true); exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; int h = var_Items.AddItem("Project"); var_Items.AddBar(h,"Summary",Convert.ToDateTime("9/21/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("10/3/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); int h1 = var_Items.InsertItem(h,null,"Task 1"); var_Items.AddBar(h1,"T",Convert.ToDateTime("9/21/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("9/24/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); int h2 = var_Items.InsertItem(h,null,"Task 2"); var_Items.AddBar(h2,"T",Convert.ToDateTime("9/24/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("9/28/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); int h3 = var_Items.InsertItem(h,null,"Task 3"); var_Items.AddBar(h3,"T",Convert.ToDateTime("9/28/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("10/3/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.DefineSummaryBars(h,"",h1,""); var_Items.DefineSummaryBars(h,"",h2,""); var_Items.DefineSummaryBars(h,"",h3,""); var_Items.set_ExpandItem(h,true); var_Items.set_ItemBold(h,true); var_Items.set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarMoveStart,Convert.ToDateTime("9/22/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); exg2antt1.EndUpdate(); |
1780 |
I have a column of date-type, the question is how can I move the associated bar, instead of resizing it (summary)
exg2antt1.BeginUpdate(); exg2antt1.MarkSearchColumn = false; exg2antt1.Indent = 11; exg2antt1.HasLines = exontrol.EXG2ANTTLib.HierarchyLineEnum.exSolidLine; exg2antt1.Items.AllowCellValueToItemBar = true; exontrol.EXG2ANTTLib.Columns var_Columns = exg2antt1.Columns; var_Columns.Add("Tasks"); exontrol.EXG2ANTTLib.Column var_Column = (var_Columns.Add("Start") as exontrol.EXG2ANTTLib.Column); var_Column.set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,544); var_Column.Editor.EditType = exontrol.EXG2ANTTLib.EditTypeEnum.DateType; var_Column.LevelKey = 1; exontrol.EXG2ANTTLib.Column var_Column1 = (var_Columns.Add("End") as exontrol.EXG2ANTTLib.Column); var_Column1.set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,545); var_Column1.Editor.EditType = exontrol.EXG2ANTTLib.EditTypeEnum.DateType; var_Column1.LevelKey = 1; exontrol.EXG2ANTTLib.Chart var_Chart = exg2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("9/20/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.AllowLinkBars = false; var_Chart.AllowCreateBar = exontrol.EXG2ANTTLib.CreateBarEnum.exNoCreateBar; var_Chart.LevelCount = 2; var_Chart.set_PaneWidth(false,224); exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; int h = var_Items.AddItem("Project"); var_Items.AddBar(h,"Summary",Convert.ToDateTime("9/21/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("10/3/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); int h1 = var_Items.InsertItem(h,null,"Task 1"); var_Items.AddBar(h1,"Task",Convert.ToDateTime("9/21/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("9/24/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); int h2 = var_Items.InsertItem(h,null,"Task 2"); var_Items.AddBar(h2,"Task",Convert.ToDateTime("9/24/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("9/28/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); int h3 = var_Items.InsertItem(h,null,"Task 3"); var_Items.AddBar(h3,"Task",Convert.ToDateTime("9/28/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("10/3/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.DefineSummaryBars(h,"",h1,""); var_Items.DefineSummaryBars(h,"",h2,""); var_Items.DefineSummaryBars(h,"",h3,""); var_Items.set_ExpandItem(h,true); var_Items.set_ItemBold(h,true); var_Items.set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarMoveStart,Convert.ToDateTime("9/22/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); exg2antt1.EndUpdate(); |
1779 |
Is it possible to programmatically move all bars of specified key to end at specified date (inclusive)
exg2antt1.BeginUpdate(); exg2antt1.Debug = true; exg2antt1.Columns.Add("Tasks"); exontrol.EXG2ANTTLib.Chart var_Chart = exg2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.LevelCount = 2; var_Chart.set_PaneWidth(false,48); exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; var_Items.AddBar(var_Items.AddItem("Task A.1"),"Task",Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A",null); var_Items.AddBar(var_Items.AddItem("Task A.2"),"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A",null); var_Items.AddBar(var_Items.AddItem("Task B.1"),"Task",Convert.ToDateTime("1/3/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"B",null); var_Items.AddBar(var_Items.AddItem("Task B.2"),"Task",Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/9/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"B",null); var_Items.set_ItemBar(0,"<A*>",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarMoveEndInclusive,Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); exg2antt1.EndUpdate(); |
1778 |
Is it possible to programmatically move all bars to end at specified date (inclusive)
exg2antt1.BeginUpdate(); exg2antt1.Debug = true; exg2antt1.Columns.Add("Tasks"); exontrol.EXG2ANTTLib.Chart var_Chart = exg2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.LevelCount = 2; var_Chart.set_PaneWidth(false,48); exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; var_Items.AddBar(var_Items.AddItem("Task A.1"),"Task",Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A",null); var_Items.AddBar(var_Items.AddItem("Task A.2"),"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A",null); var_Items.AddBar(var_Items.AddItem("Task B.1"),"Task",Convert.ToDateTime("1/3/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"B",null); var_Items.AddBar(var_Items.AddItem("Task B.2"),"Task",Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/9/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"B",null); var_Items.set_ItemBar(0,"<*>",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarMoveEndInclusive,Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); exg2antt1.EndUpdate(); |
1777 |
Is it possible to programmatically move all bars of specified key to end at specified date
exg2antt1.BeginUpdate(); exg2antt1.Debug = true; exg2antt1.Columns.Add("Tasks"); exontrol.EXG2ANTTLib.Chart var_Chart = exg2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.LevelCount = 2; var_Chart.set_PaneWidth(false,48); exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; var_Items.AddBar(var_Items.AddItem("Task A.1"),"Task",Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A",null); var_Items.AddBar(var_Items.AddItem("Task A.2"),"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A",null); var_Items.AddBar(var_Items.AddItem("Task B.1"),"Task",Convert.ToDateTime("1/3/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"B",null); var_Items.AddBar(var_Items.AddItem("Task B.2"),"Task",Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/9/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"B",null); var_Items.set_ItemBar(0,"<A*>",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarMoveEnd,Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); exg2antt1.EndUpdate(); |
1776 |
Is it possible to programmatically move all bars to end at specified date
exg2antt1.BeginUpdate(); exg2antt1.Debug = true; exg2antt1.Columns.Add("Tasks"); exontrol.EXG2ANTTLib.Chart var_Chart = exg2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.LevelCount = 2; var_Chart.set_PaneWidth(false,48); exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; var_Items.AddBar(var_Items.AddItem("Task A.1"),"Task",Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A",null); var_Items.AddBar(var_Items.AddItem("Task A.2"),"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A",null); var_Items.AddBar(var_Items.AddItem("Task B.1"),"Task",Convert.ToDateTime("1/3/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"B",null); var_Items.AddBar(var_Items.AddItem("Task B.2"),"Task",Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/9/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"B",null); var_Items.set_ItemBar(0,"<*>",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarMoveEnd,Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); exg2antt1.EndUpdate(); |
1775 |
Is it possible to programmatically move all bars of specified key to start at specified date
exg2antt1.BeginUpdate(); exg2antt1.Debug = true; exg2antt1.Columns.Add("Tasks"); exontrol.EXG2ANTTLib.Chart var_Chart = exg2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.LevelCount = 2; var_Chart.set_PaneWidth(false,48); exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; var_Items.AddBar(var_Items.AddItem("Task A.1"),"Task",Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A",null); var_Items.AddBar(var_Items.AddItem("Task A.2"),"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A",null); var_Items.AddBar(var_Items.AddItem("Task B.1"),"Task",Convert.ToDateTime("1/3/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"B",null); var_Items.AddBar(var_Items.AddItem("Task B.2"),"Task",Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/9/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"B",null); var_Items.set_ItemBar(0,"<A*>",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarMoveStart,Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); exg2antt1.EndUpdate(); |
1774 |
Is it possible to programmatically move all bars to start at specified date
exg2antt1.BeginUpdate(); exg2antt1.Debug = true; exg2antt1.Columns.Add("Tasks"); exontrol.EXG2ANTTLib.Chart var_Chart = exg2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.LevelCount = 2; var_Chart.set_PaneWidth(false,48); exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; var_Items.AddBar(var_Items.AddItem("Task A.1"),"Task",Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A",null); var_Items.AddBar(var_Items.AddItem("Task A.2"),"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A",null); var_Items.AddBar(var_Items.AddItem("Task B.1"),"Task",Convert.ToDateTime("1/3/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"B",null); var_Items.AddBar(var_Items.AddItem("Task B.2"),"Task",Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/9/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"B",null); var_Items.set_ItemBar(0,"<*>",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarMoveStart,Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); exg2antt1.EndUpdate(); |
1773 |
Is it possible to programmatically move all bars of specified key
exg2antt1.BeginUpdate(); exg2antt1.Debug = true; exg2antt1.Columns.Add("Tasks"); exontrol.EXG2ANTTLib.Chart var_Chart = exg2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.LevelCount = 2; var_Chart.set_PaneWidth(false,48); exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; var_Items.AddBar(var_Items.AddItem("Task A.1"),"Task",Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A",null); var_Items.AddBar(var_Items.AddItem("Task A.2"),"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A",null); var_Items.AddBar(var_Items.AddItem("Task B.1"),"Task",Convert.ToDateTime("1/3/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"B",null); var_Items.AddBar(var_Items.AddItem("Task B.2"),"Task",Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/9/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"B",null); var_Items.set_ItemBar(0,"<A*>",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarMove,2); exg2antt1.EndUpdate(); |
1772 |
Is it possible to programmatically move all bars
exg2antt1.BeginUpdate(); exg2antt1.Debug = true; exg2antt1.Columns.Add("Tasks"); exontrol.EXG2ANTTLib.Chart var_Chart = exg2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.LevelCount = 2; var_Chart.set_PaneWidth(false,48); exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; var_Items.AddBar(var_Items.AddItem("Task A.1"),"Task",Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A",null); var_Items.AddBar(var_Items.AddItem("Task A.2"),"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A",null); var_Items.AddBar(var_Items.AddItem("Task B.1"),"Task",Convert.ToDateTime("1/3/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"B",null); var_Items.AddBar(var_Items.AddItem("Task B.2"),"Task",Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/9/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"B",null); var_Items.set_ItemBar(0,"<*>",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarMove,2); exg2antt1.EndUpdate(); |
1771 |
How can I programmatically move a bar, so it ends at specified date (inclusive)
exg2antt1.Columns.Add("Tasks"); exontrol.EXG2ANTTLib.Chart var_Chart = exg2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.LevelCount = 2; var_Chart.set_PaneWidth(false,48); exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; int h = var_Items.AddItem("Task 1"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A",null); var_Items.set_ItemBar(h,"A",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarMoveEndInclusive,Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); |
1770 |
How can I programmatically move a bar, so it ends at specified date
exg2antt1.Columns.Add("Tasks"); exontrol.EXG2ANTTLib.Chart var_Chart = exg2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.LevelCount = 2; var_Chart.set_PaneWidth(false,48); exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; int h = var_Items.AddItem("Task 1"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A",null); var_Items.set_ItemBar(h,"A",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarMoveEnd,Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); |
1769 |
How can I programmatically move a bar, so it starts at specified date
exg2antt1.Columns.Add("Tasks"); exontrol.EXG2ANTTLib.Chart var_Chart = exg2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.LevelCount = 2; var_Chart.set_PaneWidth(false,48); exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; int h = var_Items.AddItem("Task 1"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"A",null); var_Items.set_ItemBar(h,"A",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarMoveStart,Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); |
1768 |
I can’t figure out how to control the date and time format (in level 0, 1 and 2) when the user click on the OverviewZoom bottom
exg2antt1.BeginUpdate(); exg2antt1.HeaderHeight = 22; exontrol.EXG2ANTTLib.Chart var_Chart = exg2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2016",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,0); var_Chart.LevelCount = 2; var_Chart.DrawLevelSeparator = exontrol.EXG2ANTTLib.LevelLineEnum.exLevelSolidLine; var_Chart.AllowResizeChart = exontrol.EXG2ANTTLib.ResizeChartEnum.exAllowResizeChartMiddle | exontrol.EXG2ANTTLib.ResizeChartEnum.exAllowResizeChartHeader; var_Chart.MaxUnitWidth = 196; exontrol.EXG2ANTTLib.Level var_Level = var_Chart.get_Level(0); var_Level.Alignment = exontrol.EXG2ANTTLib.AlignmentEnum.exHOutside | exontrol.EXG2ANTTLib.AlignmentEnum.CenterAlignment; var_Level.DrawTickLines = exontrol.EXG2ANTTLib.LevelLineEnum.exLevelSolidLine; exontrol.EXG2ANTTLib.Level var_Level1 = var_Chart.get_Level(1); var_Level1.DrawTickLines = exontrol.EXG2ANTTLib.LevelLineEnum.exLevelMiddleLine | exontrol.EXG2ANTTLib.LevelLineEnum.exLevelDotLine; var_Level1.DrawTickLinesFrom(0,exontrol.EXG2ANTTLib.LevelLineEnum.exLevelSolidLine); var_Level1.BackColor = Color.FromArgb(240,240,240); var_Chart.OverviewVisible = exontrol.EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowAllVisible; var_Chart.AllowOverviewZoom = exontrol.EXG2ANTTLib.OverviewZoomEnum.exAlwaysZoom; var_Chart.UnitWidth = 24; var_Chart.set_Label(exontrol.EXG2ANTTLib.UnitEnum.exSecond,""); var_Chart.set_Label(exontrol.EXG2ANTTLib.UnitEnum.exMinute,""); var_Chart.set_Label(exontrol.EXG2ANTTLib.UnitEnum.exHour,""); var_Chart.set_Label(exontrol.EXG2ANTTLib.UnitEnum.exWeek,""); var_Chart.set_Label(exontrol.EXG2ANTTLib.UnitEnum.exDay,"<font ;6><%d%><|><%d%><|><%d%> <fgcolor=A0A0A0><off -4><%d1%><|><%d%> <fgcolor=A0A0A0><off -4><%d2%><|><%d%> <fgcolor=A0A0A0><o" + "ff -4><%d3%><|><%d%> <fgcolor=A0A0A0><off -4><%dddd%><||><||>4096"); var_Chart.UnitScale = exontrol.EXG2ANTTLib.UnitEnum.exDay; var_Chart.ScrollTo(var_Chart.FirstVisibleDate,1); exg2antt1.Columns.Add("Default"); exg2antt1.EndUpdate(); |
1767 |
Can I use GroupBars with OverlaidType method
exg2antt1.BeginUpdate(); exg2antt1.Columns.Add("Tasks"); exg2antt1.Debug = true; exg2antt1.LinesAtRoot = exontrol.EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot; exg2antt1.ScrollBySingleLine = true; exg2antt1.BackColorLevelHeader = exg2antt1.BackColor; exontrol.EXG2ANTTLib.Chart var_Chart = exg2antt1.Chart; var_Chart.LevelCount = 2; var_Chart.FirstVisibleDate = Convert.ToDateTime("9/20/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,96); var_Chart.Bars["Task"].OverlaidType = exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack; exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; int h = var_Items.AddItem("Project"); var_Items.AddBar(h,"Summary",Convert.ToDateTime("9/21/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("10/4/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); int h1 = var_Items.InsertItem(h,null,"Tasks"); var_Items.AddBar(h1,"Task",Convert.ToDateTime("9/21/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("9/26/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"h1",null); string h2 = h1; var_Items.AddBar(h2,"Task",Convert.ToDateTime("9/25/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("9/30/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"h2",null); var_Items.AddLink("L1",h1,"h1",h2,"h2"); string h3 = h1; var_Items.AddBar(h3,"Task",Convert.ToDateTime("9/29/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("10/4/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"h3",null); var_Items.AddLink("L2",h2,"h2",h3,"h3"); var_Items.DefineSummaryBars(h,"",h1,"h1"); var_Items.DefineSummaryBars(h,"",h2,"h2"); var_Items.DefineSummaryBars(h,"",h3,"h3"); var_Items.set_ExpandItem(h,true); var_Items.set_ItemBold(h,true); var_Items.GroupBars(h1,"h1",false,h2,"h2",true,31,"0;5;-1"); var_Items.GroupBars(h2,"h2",false,h3,"h3",true,31,"0;5;-1"); exg2antt1.EndUpdate(); |
1766 |
How do I change the link's lag so I can schedule bars to start later (with nonworking part)
// BarResizing event - Occurs when a bar is moving or resizing. private void exg2antt1_BarResizing(object sender,int Item,object Key) { exg2antt1.Items.SchedulePDM(Item,Key); } //this.exg2antt1.BarResizing += new exontrol.EXG2ANTTLib.exg2antt.BarResizingEventHandler(this.exg2antt1_BarResizing); exg2antt1.BeginUpdate(); exg2antt1.DefaultItemHeight = 22; exg2antt1.HeaderHeight = exg2antt1.DefaultItemHeight; exg2antt1.BackColorLevelHeader = exg2antt1.BackColor; exg2antt1.AntiAliasing = true; exg2antt1.Columns.Add("Task"); exontrol.EXG2ANTTLib.Chart var_Chart = exg2antt1.Chart; var_Chart.LinksStyle = exontrol.EXG2ANTTLib.LinkStyleEnum.exLinkSolid; var_Chart.LinksColor = Color.FromArgb(128,128,128); var_Chart.LevelCount = 2; var_Chart.FirstVisibleDate = Convert.ToDateTime("12/28/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,48); exontrol.EXG2ANTTLib.Bar var_Bar = var_Chart.Bars["Task"]; var_Bar.set_Def(exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarKeepWorkingCount,true); var_Bar.set_Def(exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,18); var_Bar.Color = Color.FromArgb(0,0,0); var_Bar.StartColor = Color.FromArgb(190,190,190); var_Bar.EndColor = var_Bar.StartColor; var_Bar.Pattern = exontrol.EXG2ANTTLib.PatternEnum.exPatternBox; exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; int h1 = var_Items.AddItem("Task 1"); var_Items.AddBar(h1,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1","FS lag=0 (default)"); int h2 = var_Items.AddItem("Task 2"); var_Items.AddBar(h2,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2","FS lag=4"); var_Items.AddLink("L1",h1,"K1",h2,"K2"); int h3 = var_Items.AddItem("Task 3"); var_Items.AddBar(h3,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K3","FS lag=-1"); var_Items.AddLink("L2",h2,"K2",h3,"K3"); var_Items.set_Link("L2",exontrol.EXG2ANTTLib.LinkPropertyEnum.exLinkPDMWorkingDelay,4); int h4 = var_Items.AddItem("Task 4"); var_Items.AddBar(h4,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K4",null); var_Items.AddLink("L3",h3,"K3",h4,"K4"); var_Items.set_Link("L3",exontrol.EXG2ANTTLib.LinkPropertyEnum.exLinkPDMWorkingDelay,-1); var_Items.SchedulePDM(0,"K1"); exg2antt1.EndUpdate(); |
1765 |
How do I change the link's lag so I can schedule bars to start later (without nonworking part)
// BarResizing event - Occurs when a bar is moving or resizing. private void exg2antt1_BarResizing(object sender,int Item,object Key) { exg2antt1.Items.SchedulePDM(Item,Key); } //this.exg2antt1.BarResizing += new exontrol.EXG2ANTTLib.exg2antt.BarResizingEventHandler(this.exg2antt1_BarResizing); exg2antt1.BeginUpdate(); exg2antt1.DefaultItemHeight = 22; exg2antt1.HeaderHeight = exg2antt1.DefaultItemHeight; exg2antt1.BackColorLevelHeader = exg2antt1.BackColor; exg2antt1.AntiAliasing = true; exg2antt1.Columns.Add("Task"); exontrol.EXG2ANTTLib.Chart var_Chart = exg2antt1.Chart; var_Chart.LinksStyle = exontrol.EXG2ANTTLib.LinkStyleEnum.exLinkSolid; var_Chart.LinksColor = Color.FromArgb(128,128,128); var_Chart.LevelCount = 2; var_Chart.NonworkingDays = 0; var_Chart.FirstVisibleDate = Convert.ToDateTime("12/28/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,48); exontrol.EXG2ANTTLib.Bar var_Bar = var_Chart.Bars["Task"]; var_Bar.set_Def(exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,18); var_Bar.Color = Color.FromArgb(0,0,0); var_Bar.StartColor = Color.FromArgb(190,190,190); var_Bar.EndColor = var_Bar.StartColor; var_Bar.Pattern = exontrol.EXG2ANTTLib.PatternEnum.exPatternBox; exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; int h1 = var_Items.AddItem("Task 1"); var_Items.AddBar(h1,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1","FS lag=0 (default)"); int h2 = var_Items.AddItem("Task 2"); var_Items.AddBar(h2,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2","FS lag=4"); var_Items.AddLink("L1",h1,"K1",h2,"K2"); int h3 = var_Items.AddItem("Task 3"); var_Items.AddBar(h3,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K3","FS lag=-1"); var_Items.AddLink("L2",h2,"K2",h3,"K3"); var_Items.set_Link("L2",exontrol.EXG2ANTTLib.LinkPropertyEnum.exLinkPDMDelay,4); int h4 = var_Items.AddItem("Task 4"); var_Items.AddBar(h4,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K4",null); var_Items.AddLink("L3",h3,"K3",h4,"K4"); var_Items.set_Link("L3",exontrol.EXG2ANTTLib.LinkPropertyEnum.exLinkPDMDelay,-1); var_Items.SchedulePDM(0,"K1"); exg2antt1.EndUpdate(); |
1764 |
Is it possible to select the entire row/line, when user clicks the first column, and select individually the rest of cells, while user clicks any other column
// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection. private void exg2antt1_AddGroupItem(object sender,int Item) { exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; var_Items.AddBar(Item,"Summary",var_Items.get_CellValue(Item,2),var_Items.get_CellValue(Item,4),null,null); var_Items.DefineSummaryBars(Item,"",-3,""); } //this.exg2antt1.AddGroupItem += new exontrol.EXG2ANTTLib.exg2antt.AddGroupItemEventHandler(this.exg2antt1_AddGroupItem); // AddItem event - Occurs after a new Item has been inserted to Items collection. private void exg2antt1_AddItem(object sender,int Item) { exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; var_Items.AddBar(Item,"Task",var_Items.get_CellValue(Item,2),var_Items.get_CellValue(Item,4),null,null); } //this.exg2antt1.AddItem += new exontrol.EXG2ANTTLib.exg2antt.AddItemEventHandler(this.exg2antt1_AddItem); // MouseDown event - Occurs when the user presses a mouse button. private void exg2antt1_MouseDownEvent(object sender,short Button,short Shift,int X,int Y) { int i = exg2antt1.get_ItemFromPoint(-1,-1,c,hit); exg2antt1.FullRowSelect = exg2antt1.Columns[c].Data; } //this.exg2antt1.MouseDownEvent += new exontrol.EXG2ANTTLib.exg2antt.MouseDownEventHandler(this.exg2antt1_MouseDownEvent); exg2antt1.BeginUpdate(); exg2antt1.HeaderHeight = 22; exg2antt1.HeaderAppearance = exontrol.EXG2ANTTLib.AppearanceEnum.Flat; exg2antt1.BackColorLock = Color.FromArgb(240,240,240); exg2antt1.BackColorHeader = exg2antt1.BackColorLock; exg2antt1.HasLines = exontrol.EXG2ANTTLib.HierarchyLineEnum.exNoLine; exg2antt1.ColumnAutoResize = false; exg2antt1.SortBarVisible = false; exg2antt1.AllowGroupBy = true; exg2antt1.ReadOnly = exontrol.EXG2ANTTLib.ReadOnlyEnum.exReadOnly; exg2antt1.ShowFocusRect = false; exg2antt1.CountLockedColumns = 1; exg2antt1.AutoDrag = exontrol.EXG2ANTTLib.AutoDragEnum.exAutoDragScroll; exg2antt1.SingleSort = false; exg2antt1.ColumnsAllowSizing = true; exg2antt1.DrawGridLines = exontrol.EXG2ANTTLib.GridLinesEnum.exAllLines; exg2antt1.GridLineStyle = exontrol.EXG2ANTTLib.GridLinesStyleEnum.exGridLinesSolid; exg2antt1.GridLineColor = Color.FromArgb(220,220,220); exg2antt1.Chart.FirstVisibleDate = Convert.ToDateTime("9/1/1994",System.Globalization.CultureInfo.GetCultureInfo("en-US")); exg2antt1.Chart.LevelCount = 2; exg2antt1.Chart.set_PaneWidth(false,256); exg2antt1.BackColorSortBar = exg2antt1.BackColor; exg2antt1.ColumnAutoResize = false; // Add 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' reference to your project. ADODB.Recordset rs = new ADODB.Recordset(); rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access\\misc.accdb",exontrol.ADODB.CursorTypeEnum.adOpenStatic,exontrol.ADODB.LockTypeEnum.adLockOptimistic,0); exg2antt1.DataSource = (rs as ADODB.Recordset); exg2antt1.Columns[0].Data = -1; exg2antt1.Layout = "singlesort=\"C5:1\";multiplesort=\" C1:2\""; exg2antt1.EndUpdate(); |
1763 |
I've also hit a strange problem with the BeforeExpandItem event - the Cancel parameter is declared as const in Delphi when I believe it should be declared as var or out so I can use it to return OleVariant(True) to cancel the operation, or am I missing something, or how can I disable expanding / collapsing the items
// BeforeExpandItem event - Fired before an item is about to be expanded (collapsed). private void exg2antt1_BeforeExpandItem(object sender,int Item,ref object Cancel) { exg2antt1.set_EventParam(1,true); } //this.exg2antt1.BeforeExpandItem += new exontrol.EXG2ANTTLib.exg2antt.BeforeExpandItemEventHandler(this.exg2antt1_BeforeExpandItem); // Event event - Notifies the application once the control fires an event. private void exg2antt1_Event(object sender,int EventID) { System.Diagnostics.Debug.Print( exg2antt1.get_EventParam(-2).ToString() ); } //this.exg2antt1.Event += new exontrol.EXG2ANTTLib.exg2antt.EventEventHandler(this.exg2antt1_Event); exg2antt1.BeginUpdate(); exg2antt1.LinesAtRoot = exontrol.EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot; exg2antt1.Columns.Add("Default"); exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; int h = var_Items.AddItem("Root A"); var_Items.InsertItem(h,null,"Child 1"); var_Items.InsertItem(h,null,"Child 2"); var_Items.set_ExpandItem(h,true); h = var_Items.AddItem("Root B"); var_Items.InsertItem(h,null,"Child 1"); var_Items.InsertItem(h,null,"Child 2"); var_Items.set_ExpandItem(h,true); exg2antt1.EndUpdate(); |
1762 |
Is there any way I can get rid / hide of the vertical blue lines ( today, selected date )
exg2antt1.BeginUpdate(); exontrol.EXG2ANTTLib.Chart var_Chart = exg2antt1.Chart; var_Chart.set_PaneWidth(false,128); var_Chart.LevelCount = 2; var_Chart.MarkSelectDateColor = var_Chart.BackColor; var_Chart.MarkTodayColor = var_Chart.BackColor; exg2antt1.EndUpdate(); |
1761 |
Is it possible to search for a bar through items only ( not including the locked items )
exg2antt1.BeginUpdate(); exg2antt1.Debug = true; exontrol.EXG2ANTTLib.Chart var_Chart = exg2antt1.Chart; var_Chart.set_PaneWidth(false,128); var_Chart.LevelCount = 2; var_Chart.FirstVisibleDate = Convert.ToDateTime("12/31/2015",System.Globalization.CultureInfo.GetCultureInfo("en-US")); exg2antt1.BackColorAlternate = Color.FromArgb(250,250,250); exg2antt1.ShowLockedItems = true; exg2antt1.Columns.Add("Column"); exontrol.EXG2ANTTLib.Column var_Column = (exg2antt1.Columns.Add("Find") as exontrol.EXG2ANTTLib.Column); var_Column.set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueFormat,1); var_Column.Visible = false; var_Column.FormatColumn = "int(value) = 0 ? `` : ` <fgcolor=FF0000><b>found here ` "; exg2antt1.Chart.ColumnsFormatLevel = "1"; exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; var_Items.set_LockedItemCount(exontrol.EXG2ANTTLib.VAlignmentEnum.exTop,3); int h = var_Items.get_LockedItem(exontrol.EXG2ANTTLib.VAlignmentEnum.exTop,0); var_Items.set_CellValue(h,0,"locked-top 1"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/4/2016",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2016",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"T1",null); h = var_Items.get_LockedItem(exontrol.EXG2ANTTLib.VAlignmentEnum.exTop,1); var_Items.set_CellValue(h,0,"locked-top 2"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/5/2016",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/9/2016",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"T2",null); h = var_Items.get_LockedItem(exontrol.EXG2ANTTLib.VAlignmentEnum.exTop,2); var_Items.set_SelectItem(h,false); var_Items.set_ItemDivider(h,0); var_Items.set_ItemHeight(h,2); var_Items.AddBar(var_Items.AddItem("un-locked item 1"),"Task",Convert.ToDateTime("1/4/2016",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2016",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"T3",null); var_Items.AddBar(var_Items.AddItem("un-locked item 2"),"Task",Convert.ToDateTime("1/5/2016",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/9/2016",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"T4",null); var_Items.set_LockedItemCount(exontrol.EXG2ANTTLib.VAlignmentEnum.exMiddle,3); h = var_Items.get_LockedItem(exontrol.EXG2ANTTLib.VAlignmentEnum.exMiddle,0); var_Items.set_SelectItem(h,false); var_Items.set_ItemDivider(h,0); var_Items.set_ItemHeight(h,2); h = var_Items.get_LockedItem(exontrol.EXG2ANTTLib.VAlignmentEnum.exMiddle,1); var_Items.set_CellValue(h,0,"locked-bottom 1"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/4/2016",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2016",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"T5",null); h = var_Items.get_LockedItem(exontrol.EXG2ANTTLib.VAlignmentEnum.exMiddle,2); var_Items.set_CellValue(h,0,"locked-bottom 2"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/5/2016",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/9/2016",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"T6",null); exontrol.EXG2ANTTLib.Items var_Items1 = exg2antt1.Items; h = var_Items1.get_FindBar("T4",0); var_Items1.set_ItemBar(h,var_Items1.get_FirstItemBar(h),exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarColor,255); var_Items1.set_CellValue(h,1,h); exg2antt1.EndUpdate(); |
1760 |
Is it possible to search for a bar through bottom-locked-items only
exg2antt1.BeginUpdate(); exg2antt1.Debug = true; exontrol.EXG2ANTTLib.Chart var_Chart = exg2antt1.Chart; var_Chart.set_PaneWidth(false,128); var_Chart.LevelCount = 2; var_Chart.FirstVisibleDate = Convert.ToDateTime("12/31/2015",System.Globalization.CultureInfo.GetCultureInfo("en-US")); exg2antt1.BackColorAlternate = Color.FromArgb(250,250,250); exg2antt1.ShowLockedItems = true; exg2antt1.Columns.Add("Column"); exontrol.EXG2ANTTLib.Column var_Column = (exg2antt1.Columns.Add("Find") as exontrol.EXG2ANTTLib.Column); var_Column.set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueFormat,1); var_Column.Visible = false; var_Column.FormatColumn = "int(value) = 0 ? `` : ` <fgcolor=FF0000><b>found here ` "; exg2antt1.Chart.ColumnsFormatLevel = "1"; exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; var_Items.set_LockedItemCount(exontrol.EXG2ANTTLib.VAlignmentEnum.exTop,3); int h = var_Items.get_LockedItem(exontrol.EXG2ANTTLib.VAlignmentEnum.exTop,0); var_Items.set_CellValue(h,0,"locked-top 1"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/4/2016",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2016",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"T1",null); h = var_Items.get_LockedItem(exontrol.EXG2ANTTLib.VAlignmentEnum.exTop,1); var_Items.set_CellValue(h,0,"locked-top 2"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/5/2016",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/9/2016",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"T2",null); h = var_Items.get_LockedItem(exontrol.EXG2ANTTLib.VAlignmentEnum.exTop,2); var_Items.set_SelectItem(h,false); var_Items.set_ItemDivider(h,0); var_Items.set_ItemHeight(h,2); var_Items.AddBar(var_Items.AddItem("un-locked item 1"),"Task",Convert.ToDateTime("1/4/2016",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2016",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"T3",null); var_Items.AddBar(var_Items.AddItem("un-locked item 2"),"Task",Convert.ToDateTime("1/5/2016",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/9/2016",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"T4",null); var_Items.set_LockedItemCount(exontrol.EXG2ANTTLib.VAlignmentEnum.exMiddle,3); h = var_Items.get_LockedItem(exontrol.EXG2ANTTLib.VAlignmentEnum.exMiddle,0); var_Items.set_SelectItem(h,false); var_Items.set_ItemDivider(h,0); var_Items.set_ItemHeight(h,2); h = var_Items.get_LockedItem(exontrol.EXG2ANTTLib.VAlignmentEnum.exMiddle,1); var_Items.set_CellValue(h,0,"locked-bottom 1"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/4/2016",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2016",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"T5",null); h = var_Items.get_LockedItem(exontrol.EXG2ANTTLib.VAlignmentEnum.exMiddle,2); var_Items.set_CellValue(h,0,"locked-bottom 2"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/5/2016",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/9/2016",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"T6",null); exontrol.EXG2ANTTLib.Items var_Items1 = exg2antt1.Items; h = var_Items1.get_FindBar("T6",-4); var_Items1.set_ItemBar(h,var_Items1.get_FirstItemBar(h),exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarColor,255); var_Items1.set_CellValue(h,1,h); exg2antt1.EndUpdate(); |
1759 |
Is it possible to search for a bar through top-locked-items only
exg2antt1.BeginUpdate(); exg2antt1.Debug = true; exontrol.EXG2ANTTLib.Chart var_Chart = exg2antt1.Chart; var_Chart.set_PaneWidth(false,128); var_Chart.LevelCount = 2; var_Chart.FirstVisibleDate = Convert.ToDateTime("12/31/2015",System.Globalization.CultureInfo.GetCultureInfo("en-US")); exg2antt1.BackColorAlternate = Color.FromArgb(250,250,250); exg2antt1.ShowLockedItems = true; exg2antt1.Columns.Add("Column"); exontrol.EXG2ANTTLib.Column var_Column = (exg2antt1.Columns.Add("Find") as exontrol.EXG2ANTTLib.Column); var_Column.set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueFormat,1); var_Column.Visible = false; var_Column.FormatColumn = "int(value) = 0 ? `` : ` <fgcolor=FF0000><b>found here ` "; exg2antt1.Chart.ColumnsFormatLevel = "1"; exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; var_Items.set_LockedItemCount(exontrol.EXG2ANTTLib.VAlignmentEnum.exTop,3); int h = var_Items.get_LockedItem(exontrol.EXG2ANTTLib.VAlignmentEnum.exTop,0); var_Items.set_CellValue(h,0,"locked-top 1"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/4/2016",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2016",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"T1",null); h = var_Items.get_LockedItem(exontrol.EXG2ANTTLib.VAlignmentEnum.exTop,1); var_Items.set_CellValue(h,0,"locked-top 2"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/5/2016",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/9/2016",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"T2",null); h = var_Items.get_LockedItem(exontrol.EXG2ANTTLib.VAlignmentEnum.exTop,2); var_Items.set_SelectItem(h,false); var_Items.set_ItemDivider(h,0); var_Items.set_ItemHeight(h,2); var_Items.AddBar(var_Items.AddItem("un-locked item 1"),"Task",Convert.ToDateTime("1/4/2016",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2016",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"T3",null); var_Items.AddBar(var_Items.AddItem("un-locked item 2"),"Task",Convert.ToDateTime("1/5/2016",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/9/2016",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"T4",null); var_Items.set_LockedItemCount(exontrol.EXG2ANTTLib.VAlignmentEnum.exMiddle,3); h = var_Items.get_LockedItem(exontrol.EXG2ANTTLib.VAlignmentEnum.exMiddle,0); var_Items.set_SelectItem(h,false); var_Items.set_ItemDivider(h,0); var_Items.set_ItemHeight(h,2); h = var_Items.get_LockedItem(exontrol.EXG2ANTTLib.VAlignmentEnum.exMiddle,1); var_Items.set_CellValue(h,0,"locked-bottom 1"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/4/2016",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2016",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"T5",null); h = var_Items.get_LockedItem(exontrol.EXG2ANTTLib.VAlignmentEnum.exMiddle,2); var_Items.set_CellValue(h,0,"locked-bottom 2"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/5/2016",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/9/2016",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"T6",null); exontrol.EXG2ANTTLib.Items var_Items1 = exg2antt1.Items; h = var_Items1.get_FindBar("T1",-3); var_Items1.set_ItemBar(h,var_Items1.get_FirstItemBar(h),exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarColor,255); var_Items1.set_CellValue(h,1,h); exg2antt1.EndUpdate(); |
1758 |
Is it possible to search for a bar through all locked-items only
exg2antt1.BeginUpdate(); exg2antt1.Debug = true; exontrol.EXG2ANTTLib.Chart var_Chart = exg2antt1.Chart; var_Chart.set_PaneWidth(false,128); var_Chart.LevelCount = 2; var_Chart.FirstVisibleDate = Convert.ToDateTime("12/31/2015",System.Globalization.CultureInfo.GetCultureInfo("en-US")); exg2antt1.BackColorAlternate = Color.FromArgb(250,250,250); exg2antt1.ShowLockedItems = true; exg2antt1.Columns.Add("Column"); exontrol.EXG2ANTTLib.Column var_Column = (exg2antt1.Columns.Add("Find") as exontrol.EXG2ANTTLib.Column); var_Column.set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueFormat,1); var_Column.Visible = false; var_Column.FormatColumn = "int(value) = 0 ? `` : ` <fgcolor=FF0000><b>found here ` "; exg2antt1.Chart.ColumnsFormatLevel = "1"; exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; var_Items.set_LockedItemCount(exontrol.EXG2ANTTLib.VAlignmentEnum.exTop,3); int h = var_Items.get_LockedItem(exontrol.EXG2ANTTLib.VAlignmentEnum.exTop,0); var_Items.set_CellValue(h,0,"locked-top 1"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/4/2016",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2016",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"T1",null); h = var_Items.get_LockedItem(exontrol.EXG2ANTTLib.VAlignmentEnum.exTop,1); var_Items.set_CellValue(h,0,"locked-top 2"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/5/2016",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/9/2016",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"T2",null); h = var_Items.get_LockedItem(exontrol.EXG2ANTTLib.VAlignmentEnum.exTop,2); var_Items.set_SelectItem(h,false); var_Items.set_ItemDivider(h,0); var_Items.set_ItemHeight(h,2); var_Items.AddBar(var_Items.AddItem("un-locked item 1"),"Task",Convert.ToDateTime("1/4/2016",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2016",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"T3",null); var_Items.AddBar(var_Items.AddItem("un-locked item 2"),"Task",Convert.ToDateTime("1/5/2016",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/9/2016",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"T4",null); var_Items.set_LockedItemCount(exontrol.EXG2ANTTLib.VAlignmentEnum.exMiddle,3); h = var_Items.get_LockedItem(exontrol.EXG2ANTTLib.VAlignmentEnum.exMiddle,0); var_Items.set_SelectItem(h,false); var_Items.set_ItemDivider(h,0); var_Items.set_ItemHeight(h,2); h = var_Items.get_LockedItem(exontrol.EXG2ANTTLib.VAlignmentEnum.exMiddle,1); var_Items.set_CellValue(h,0,"locked-bottom 1"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/4/2016",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2016",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"T5",null); h = var_Items.get_LockedItem(exontrol.EXG2ANTTLib.VAlignmentEnum.exMiddle,2); var_Items.set_CellValue(h,0,"locked-bottom 2"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/5/2016",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/9/2016",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"T6",null); exontrol.EXG2ANTTLib.Items var_Items1 = exg2antt1.Items; h = var_Items1.get_FindBar("T2",-2); var_Items1.set_ItemBar(h,var_Items1.get_FirstItemBar(h),exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarColor,255); var_Items1.set_CellValue(h,1,h); exg2antt1.EndUpdate(); |
1757 |
Is it possible to search for a bar through all items ( including locked items )
exg2antt1.BeginUpdate(); exg2antt1.Debug = true; exontrol.EXG2ANTTLib.Chart var_Chart = exg2antt1.Chart; var_Chart.set_PaneWidth(false,128); var_Chart.LevelCount = 2; var_Chart.FirstVisibleDate = Convert.ToDateTime("12/31/2015",System.Globalization.CultureInfo.GetCultureInfo("en-US")); exg2antt1.BackColorAlternate = Color.FromArgb(250,250,250); exg2antt1.ShowLockedItems = true; exg2antt1.Columns.Add("Column"); exontrol.EXG2ANTTLib.Column var_Column = (exg2antt1.Columns.Add("Find") as exontrol.EXG2ANTTLib.Column); var_Column.set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueFormat,1); var_Column.Visible = false; var_Column.FormatColumn = "int(value) = 0 ? `` : ` <fgcolor=FF0000><b>found here ` "; exg2antt1.Chart.ColumnsFormatLevel = "1"; exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; var_Items.set_LockedItemCount(exontrol.EXG2ANTTLib.VAlignmentEnum.exTop,3); int h = var_Items.get_LockedItem(exontrol.EXG2ANTTLib.VAlignmentEnum.exTop,0); var_Items.set_CellValue(h,0,"locked-top 1"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/4/2016",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2016",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"T1",null); h = var_Items.get_LockedItem(exontrol.EXG2ANTTLib.VAlignmentEnum.exTop,1); var_Items.set_CellValue(h,0,"locked-top 2"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/5/2016",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/9/2016",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"T2",null); h = var_Items.get_LockedItem(exontrol.EXG2ANTTLib.VAlignmentEnum.exTop,2); var_Items.set_SelectItem(h,false); var_Items.set_ItemDivider(h,0); var_Items.set_ItemHeight(h,2); var_Items.AddBar(var_Items.AddItem("un-locked item 1"),"Task",Convert.ToDateTime("1/4/2016",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2016",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"T3",null); var_Items.AddBar(var_Items.AddItem("un-locked item 2"),"Task",Convert.ToDateTime("1/5/2016",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/9/2016",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"T4",null); var_Items.set_LockedItemCount(exontrol.EXG2ANTTLib.VAlignmentEnum.exMiddle,3); h = var_Items.get_LockedItem(exontrol.EXG2ANTTLib.VAlignmentEnum.exMiddle,0); var_Items.set_SelectItem(h,false); var_Items.set_ItemDivider(h,0); var_Items.set_ItemHeight(h,2); h = var_Items.get_LockedItem(exontrol.EXG2ANTTLib.VAlignmentEnum.exMiddle,1); var_Items.set_CellValue(h,0,"locked-bottom 1"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/4/2016",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2016",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"T5",null); h = var_Items.get_LockedItem(exontrol.EXG2ANTTLib.VAlignmentEnum.exMiddle,2); var_Items.set_CellValue(h,0,"locked-bottom 2"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/5/2016",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/9/2016",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"T6",null); exontrol.EXG2ANTTLib.Items var_Items1 = exg2antt1.Items; h = var_Items1.get_FindBar("T5",-1); var_Items1.set_ItemBar(h,var_Items1.get_FirstItemBar(h),exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarColor,255); var_Items1.set_CellValue(h,1,h); exg2antt1.EndUpdate(); |
1756 |
How do I clip/hide/align the bar's caption/text based on the bar's size/width/length
exg2antt1.BeginUpdate(); exg2antt1.Columns.Add("Clip"); exg2antt1.ScrollBySingleLine = true; exg2antt1.DrawGridLines = exontrol.EXG2ANTTLib.GridLinesEnum.exRowLines; exontrol.EXG2ANTTLib.Chart var_Chart = exg2antt1.Chart; var_Chart.AllowResizeChart = exontrol.EXG2ANTTLib.ResizeChartEnum.exAllowResizeChartMiddle | exontrol.EXG2ANTTLib.ResizeChartEnum.exAllowResizeChartHeader; var_Chart.DrawGridLines = exontrol.EXG2ANTTLib.GridLinesEnum.exRowLines; var_Chart.FirstVisibleDate = Convert.ToDateTime("12/23/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.LevelCount = 2; var_Chart.set_PaneWidth(false,216); exontrol.EXG2ANTTLib.Bar var_Bar = var_Chart.Bars["Task"]; var_Bar.Pattern = exontrol.EXG2ANTTLib.PatternEnum.exPatternBox; var_Bar.Color = Color.FromArgb(164,164,164); var_Bar.StartColor = Color.FromArgb(240,240,240); var_Bar.EndColor = var_Bar.StartColor; var_Bar.OverlaidType = exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsIncludeCaption | exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange | exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack; var_Bar.Height = 15; var_Chart.MinUnitWidth = var_Chart.UnitWidth; exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; int h = var_Items.AddItem("no clip, (0-2)"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1","no clip, right(<b>2</b>)"); var_Items.set_ItemBar(h,"K1",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,2); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2","no clip, center(<b>1</b>)"); var_Items.set_ItemBar(h,"K2",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,1); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K3","no clip, left(<b>0</b>)"); var_Items.set_ItemBar(h,"K3",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,0); h = var_Items.AddItem("clip, inside (3-5)"); var_Items.AddBar(h,"Task",Convert.ToDateTime("12/28/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1","clip, inside, right(<b>5</b>)"); var_Items.set_ItemBar(h,"K1",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,5); var_Items.AddBar(h,"Task",Convert.ToDateTime("12/28/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2","clip, inside, center(<b>4</b>)"); var_Items.set_ItemBar(h,"K2",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,4); var_Items.AddBar(h,"Task",Convert.ToDateTime("12/28/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K3","clip, inside, left(<b>3</b>)"); var_Items.set_ItemBar(h,"K3",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,3); h = var_Items.AddItem("hide on min width, clip if not fit, inside (6-8)"); var_Items.AddBar(h,"Task",Convert.ToDateTime("12/26/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/10/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1","hide on min width, clip if not fit, inside, right(<b>8</b>)"); var_Items.set_ItemBar(h,"K1",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,8); var_Items.AddBar(h,"Task",Convert.ToDateTime("12/26/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/10/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2","hide on min width, clip if not fit, inside, center(<b>7</b>)"); var_Items.set_ItemBar(h,"K2",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,7); var_Items.AddBar(h,"Task",Convert.ToDateTime("12/26/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/10/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K3","hide on min width, clip if not fit, inside, left(<b>6</b>)"); var_Items.set_ItemBar(h,"K3",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,6); h = var_Items.AddItem("hide if not fit, no clip, inside (9-11)"); var_Items.AddBar(h,"Task",Convert.ToDateTime("12/28/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1","hide if not fit, no clip, inside, right(<b>11</b>)"); var_Items.set_ItemBar(h,"K1",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,11); var_Items.AddBar(h,"Task",Convert.ToDateTime("12/28/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2","hide if not fit, no clip, center(<b>10</b>)"); var_Items.set_ItemBar(h,"K2",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,10); var_Items.AddBar(h,"Task",Convert.ToDateTime("12/28/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K3","hide if not fit, no clip, inside, left(<b>9</b>)"); var_Items.set_ItemBar(h,"K3",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,9); h = var_Items.AddItem("no clip, inside, outside (12-14)"); var_Items.AddBar(h,"Task",Convert.ToDateTime("12/28/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1","no clip, inside, outside, right(<b>14</b>)"); var_Items.set_ItemBar(h,"K1",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,14); var_Items.AddBar(h,"Task",Convert.ToDateTime("12/28/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2","no clip, inside, outside, center(<b>13</b>)"); var_Items.set_ItemBar(h,"K2",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,13); var_Items.AddBar(h,"Task",Convert.ToDateTime("12/28/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K3","no clip, inside, outside, left(<b>12</b>)"); var_Items.set_ItemBar(h,"K3",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,12); h = var_Items.AddItem("no clip, outside (16-18)"); var_Items.AddBar(h,"Task",Convert.ToDateTime("12/30/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1","no clip, outside, right(<b>18</b>)"); var_Items.set_ItemBar(h,"K1",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,18); var_Items.AddBar(h,"Task",Convert.ToDateTime("12/30/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2","no clip, outside, center(<b>17</b>)"); var_Items.set_ItemBar(h,"K2",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,17); var_Items.AddBar(h,"Task",Convert.ToDateTime("12/30/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K3","no clip, outside, left(<b>16</b>)"); var_Items.set_ItemBar(h,"K3",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,16); exg2antt1.EndUpdate(); |
1755 |
Is there a way to prevent the automatic horizontal scrolling of the chart when moving or resizing a bar (method 2)
// DateChange event - Occurs when the first visible date is changed. private void exg2antt1_DateChange(object sender) { exg2antt1.Chart.FirstVisibleDate = Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); } //this.exg2antt1.DateChange += new exontrol.EXG2ANTTLib.exg2antt.DateChangeEventHandler(this.exg2antt1_DateChange); exg2antt1.BeginUpdate(); exg2antt1.Columns.Add("Tasks"); exontrol.EXG2ANTTLib.Column var_Column = (exg2antt1.Columns.Add("Start") as exontrol.EXG2ANTTLib.Column); var_Column.set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,1); var_Column.Visible = false; var_Column.Alignment = exontrol.EXG2ANTTLib.AlignmentEnum.LeftAlignment; exontrol.EXG2ANTTLib.Column var_Column1 = (exg2antt1.Columns.Add("End") as exontrol.EXG2ANTTLib.Column); var_Column1.set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,2); var_Column1.Visible = false; var_Column1.Alignment = exontrol.EXG2ANTTLib.AlignmentEnum.RightAlignment; exontrol.EXG2ANTTLib.Chart var_Chart = exg2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.LevelCount = 2; var_Chart.set_PaneWidth(false,48); var_Chart.ColumnsFormatLevel = "1[bg=12500670]:52,|,2[bg=12500670]:52"; var_Chart.ColumnsTransparent = 50; var_Chart.ScrollBar = false; exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; var_Items.AllowCellValueToItemBar = true; var_Items.AddBar(var_Items.AddItem("Task 1"),"Task",Convert.ToDateTime("1/3/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.AddBar(var_Items.AddItem("Task 2"),"Task",Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); exg2antt1.EndUpdate(); |
1754 |
Is there a way to prevent the automatic horizontal scrolling of the chart when moving or resizing a bar, including limiting the bars
// BarResizing event - Occurs when a bar is moving or resizing. private void exg2antt1_BarResizing(object sender,int Item,object Key) { exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; var_Items.set_ItemBar(Item,Key,exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarMinStart,Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); var_Items.set_ItemBar(Item,Key,exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarMaxEnd,Convert.ToDateTime("2/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); } //this.exg2antt1.BarResizing += new exontrol.EXG2ANTTLib.exg2antt.BarResizingEventHandler(this.exg2antt1_BarResizing); exg2antt1.BeginUpdate(); exg2antt1.Columns.Add("Tasks"); exontrol.EXG2ANTTLib.Column var_Column = (exg2antt1.Columns.Add("Start") as exontrol.EXG2ANTTLib.Column); var_Column.set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,1); var_Column.Visible = false; var_Column.Alignment = exontrol.EXG2ANTTLib.AlignmentEnum.LeftAlignment; exontrol.EXG2ANTTLib.Column var_Column1 = (exg2antt1.Columns.Add("End") as exontrol.EXG2ANTTLib.Column); var_Column1.set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,2); var_Column1.Visible = false; var_Column1.Alignment = exontrol.EXG2ANTTLib.AlignmentEnum.RightAlignment; exontrol.EXG2ANTTLib.Chart var_Chart = exg2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.LevelCount = 2; var_Chart.set_PaneWidth(false,48); var_Chart.ColumnsFormatLevel = "1[bg=12500670]:52,|,2[bg=12500670]:52"; var_Chart.ColumnsTransparent = 50; var_Chart.set_ScrollRange(exontrol.EXG2ANTTLib.ScrollRangeEnum.exStartDate,Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); var_Chart.set_ScrollRange(exontrol.EXG2ANTTLib.ScrollRangeEnum.exEndDate,Convert.ToDateTime("1/31/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; var_Items.AllowCellValueToItemBar = true; var_Items.AddBar(var_Items.AddItem("Task 1"),"Task",Convert.ToDateTime("1/3/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.AddBar(var_Items.AddItem("Task 2"),"Task",Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); exg2antt1.EndUpdate(); |
1753 |
Is there a way to prevent the automatic horizontal scrolling of the chart when moving or resizing a bar (method 1)
exg2antt1.BeginUpdate(); exg2antt1.Columns.Add("Tasks"); exontrol.EXG2ANTTLib.Column var_Column = (exg2antt1.Columns.Add("Start") as exontrol.EXG2ANTTLib.Column); var_Column.set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,1); var_Column.Visible = false; var_Column.Alignment = exontrol.EXG2ANTTLib.AlignmentEnum.LeftAlignment; exontrol.EXG2ANTTLib.Column var_Column1 = (exg2antt1.Columns.Add("End") as exontrol.EXG2ANTTLib.Column); var_Column1.set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,2); var_Column1.Visible = false; var_Column1.Alignment = exontrol.EXG2ANTTLib.AlignmentEnum.RightAlignment; exontrol.EXG2ANTTLib.Chart var_Chart = exg2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.LevelCount = 2; var_Chart.set_PaneWidth(false,48); var_Chart.ColumnsFormatLevel = "1[bg=12500670]:52,|,2[bg=12500670]:52"; var_Chart.ColumnsTransparent = 50; var_Chart.set_ScrollRange(exontrol.EXG2ANTTLib.ScrollRangeEnum.exStartDate,Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); var_Chart.set_ScrollRange(exontrol.EXG2ANTTLib.ScrollRangeEnum.exEndDate,Convert.ToDateTime("1/31/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; var_Items.AllowCellValueToItemBar = true; var_Items.AddBar(var_Items.AddItem("Task 1"),"Task",Convert.ToDateTime("1/3/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.AddBar(var_Items.AddItem("Task 2"),"Task",Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); exg2antt1.EndUpdate(); |
1752 |
Is it possible to have "Preview Window" as a "Modal Window or 'always-on-top window'"
exg2antt1.BeginUpdate(); exg2antt1.Columns.Add("Task"); exg2antt1.Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; int h1 = var_Items.AddItem("Task 1"); var_Items.AddBar(h1,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); int h2 = var_Items.AddItem("Task 2"); var_Items.AddBar(h2,"Task",Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2",null); var_Items.AddLink("L1",h1,"K1",h2,"K2"); var_Items.set_Link("L1",exontrol.EXG2ANTTLib.LinkPropertyEnum.exLinkStartPos,0); exg2antt1.EndUpdate(); // Add 'exontrol.exprint.dll(ExPrint.dll)' reference to your project. // Add 'ExPrint 1.0 Control Library(ExPrint.dll)' reference to your project. exontrol.EXPRINTLib.exprint var_Print = new exontrol.EXPRINTLib.exprint(); System.Diagnostics.Debug.Print( var_Print.Version ); var_Print.Foreground = -1; var_Print.PrintExt = (exg2antt1 as exontrol.EXG2ANTTLib.exg2antt); var_Print.Preview(); |
1751 |
The week number is not correct (wrong). What can I do
|
1750 |
When the user zooms with the mouse, the chart automatically switches the unit scale - ideally I'd like to replicate this so I can switch the unitscale at the same "zoom levels" that the mouse zooming does - is this possible
// ChartEndChanging event - Occurs after the chart has been changed. private void exg2antt1_ChartEndChanging(object sender,exontrol.EXG2ANTTLib.BarOperationEnum Operation) { exontrol.EXG2ANTTLib.Chart var_Chart = exg2antt1.Chart; System.Diagnostics.Debug.Print( "FirstVisibleDate" ); System.Diagnostics.Debug.Print( var_Chart.FirstVisibleDate.ToString() ); System.Diagnostics.Debug.Print( "UnitScale" ); System.Diagnostics.Debug.Print( var_Chart.UnitScale.ToString() ); System.Diagnostics.Debug.Print( "UnitWidth" ); System.Diagnostics.Debug.Print( var_Chart.UnitWidth.ToString() ); } //this.exg2antt1.ChartEndChanging += new exontrol.EXG2ANTTLib.exg2antt.ChartEndChangingEventHandler(this.exg2antt1_ChartEndChanging); exg2antt1.BeginUpdate(); exontrol.EXG2ANTTLib.Chart var_Chart = exg2antt1.Chart; var_Chart.LevelCount = 3; var_Chart.AllowResizeChart = exontrol.EXG2ANTTLib.ResizeChartEnum.exAllowChangeUnitScale | exontrol.EXG2ANTTLib.ResizeChartEnum.exAllowResizeChartMiddle | exontrol.EXG2ANTTLib.ResizeChartEnum.exAllowResizeChartHeader; var_Chart.set_PaneWidth(false,0); var_Chart.MarkTodayColor = var_Chart.BackColor; exg2antt1.EndUpdate(); |
1749 |
The first week number is not correctly assigned. What can I do
|
1748 |
How can I display the +/- expand - collapse buttons, a bit larger
exg2antt1.BeginUpdate(); exontrol.EXG2ANTTLib.Appearance var_Appearance = exg2antt1.VisualAppearance; var_Appearance.Add(3,"c:\\exontrol\\images\\normal.ebn"); var_Appearance.Add(4,"c:\\exontrol\\images\\pushed.ebn"); var_Appearance.Add(1,"CP:3 -4 -4 4 4"); var_Appearance.Add(2,"CP:4 -4 -4 4 4"); exg2antt1.LinesAtRoot = exontrol.EXG2ANTTLib.LinesAtRootEnum.exGroupLinesAtRoot; exg2antt1.HasButtons = exontrol.EXG2ANTTLib.ExpandButtonEnum.exCustom; exg2antt1.set_HasButtonsCustom(false,16777216); exg2antt1.set_HasButtonsCustom(true,33554432); exg2antt1.Columns.Add("Column"); exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; int h = var_Items.AddItem("Root 1"); var_Items.InsertItem(h,null,"Child 1"); var_Items.InsertItem(h,null,"Child 2"); var_Items.set_ExpandItem(h,true); h = var_Items.AddItem("Root 2"); var_Items.InsertItem(h,null,"Child"); exg2antt1.EndUpdate(); |
1747 |
Is there any option to control where I can drop the items when using the AutoDrag property
// AllowAutoDrag event - Occurs when the user drags the item between InsertA and InsertB as child of NewParent. private void exg2antt1_AllowAutoDrag(object sender,int Item,int NewParent,int InsertA,int InsertB,ref bool Cancel) { exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; System.Diagnostics.Debug.Print( "NewParent" ); System.Diagnostics.Debug.Print( var_Items.get_CellCaption(NewParent,0) ); System.Diagnostics.Debug.Print( "After" ); System.Diagnostics.Debug.Print( var_Items.get_CellCaption(InsertA,0) ); System.Diagnostics.Debug.Print( "Before" ); System.Diagnostics.Debug.Print( var_Items.get_CellCaption(InsertB,0) ); Cancel = true; } //this.exg2antt1.AllowAutoDrag += new exontrol.EXG2ANTTLib.exg2antt.AllowAutoDragEventHandler(this.exg2antt1_AllowAutoDrag); exg2antt1.BeginUpdate(); exg2antt1.AutoDrag = exontrol.EXG2ANTTLib.AutoDragEnum.exAutoDragPositionAny; exg2antt1.LinesAtRoot = exontrol.EXG2ANTTLib.LinesAtRootEnum.exNoLinesAtRoot; exg2antt1.HasLines = exontrol.EXG2ANTTLib.HierarchyLineEnum.exThinLine; exg2antt1.ShowFocusRect = false; exg2antt1.Columns.Add("Task"); exontrol.EXG2ANTTLib.Chart var_Chart = exg2antt1.Chart; var_Chart.ShowNonworkingDates = false; var_Chart.FirstVisibleDate = Convert.ToDateTime("12/29/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,96); var_Chart.LevelCount = 2; exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; int h = var_Items.AddItem("Group 1"); var_Items.set_ItemDivider(h,0); var_Items.set_ItemBold(h,true); int h1 = var_Items.InsertItem(h,null,"Task 1"); var_Items.AddBar(h1,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K1",null); int h2 = var_Items.InsertItem(h,null,"Task 2"); var_Items.AddBar(h2,"Task",Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K2",null); var_Items.AddLink("L1",h1,"K1",h2,"K2"); var_Items.set_Link("L1",exontrol.EXG2ANTTLib.LinkPropertyEnum.exLinkText,"L1"); int h3 = var_Items.InsertItem(h,null,"Task 3"); var_Items.AddBar(h3,"Task",Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/10/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"K3",null); var_Items.AddLink("L2",h2,"K2",h3,"K3"); var_Items.set_Link("L2",exontrol.EXG2ANTTLib.LinkPropertyEnum.exLinkText,"L2"); var_Items.set_ExpandItem(h,true); h = var_Items.AddItem("Group 2"); var_Items.set_ItemBold(h,true); var_Items.set_ItemDivider(h,0); exg2antt1.EndUpdate(); |
1746 |
The column (chart section ) overlaps the bars, when using the ColumnsFormatLevel property. How can I prevent that
exg2antt1.BeginUpdate(); exg2antt1.Columns.Add("Tasks"); exontrol.EXG2ANTTLib.Column var_Column = (exg2antt1.Columns.Add("Start") as exontrol.EXG2ANTTLib.Column); var_Column.set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,1); var_Column.Visible = false; var_Column.Alignment = exontrol.EXG2ANTTLib.AlignmentEnum.LeftAlignment; exontrol.EXG2ANTTLib.Column var_Column1 = (exg2antt1.Columns.Add("End") as exontrol.EXG2ANTTLib.Column); var_Column1.set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,2); var_Column1.Visible = false; var_Column1.Alignment = exontrol.EXG2ANTTLib.AlignmentEnum.RightAlignment; exontrol.EXG2ANTTLib.Chart var_Chart = exg2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.LevelCount = 2; var_Chart.set_PaneWidth(false,48); var_Chart.ColumnsFormatLevel = "1[bg=12500670]:52,|,2[bg=12500670]:52"; var_Chart.ColumnsTransparent = 50; exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; var_Items.AllowCellValueToItemBar = true; var_Items.AddBar(var_Items.AddItem("Task 1"),"Task",Convert.ToDateTime("1/3/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.AddBar(var_Items.AddItem("Task 2"),"Task",Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); exg2antt1.EndUpdate(); |
1745 |
How do I show the column ( chart section ) with a different background color, when using the ColumnsFormatLevel property (method 2)
exg2antt1.BeginUpdate(); exg2antt1.Columns.Add("Tasks"); exontrol.EXG2ANTTLib.Column var_Column = (exg2antt1.Columns.Add("Start") as exontrol.EXG2ANTTLib.Column); var_Column.set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,1); var_Column.Visible = false; var_Column.Alignment = exontrol.EXG2ANTTLib.AlignmentEnum.LeftAlignment; exontrol.EXG2ANTTLib.Column var_Column1 = (exg2antt1.Columns.Add("End") as exontrol.EXG2ANTTLib.Column); var_Column1.set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,2); var_Column1.Visible = false; var_Column1.Alignment = exontrol.EXG2ANTTLib.AlignmentEnum.RightAlignment; exontrol.EXG2ANTTLib.Chart var_Chart = exg2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.LevelCount = 2; var_Chart.set_PaneWidth(false,48); var_Chart.ColumnsFormatLevel = "1[bg=12500670]:52,|,2[bg=12500670]:52"; exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; var_Items.AllowCellValueToItemBar = true; var_Items.AddBar(var_Items.AddItem("Task 1"),"Task",Convert.ToDateTime("1/3/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.AddBar(var_Items.AddItem("Task 2"),"Task",Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); exg2antt1.EndUpdate(); |
1744 |
How do I show the column ( chart section ) with a different background color, when using the ColumnsFormatLevel property (method 1)
exg2antt1.BeginUpdate(); exg2antt1.Columns.Add("Tasks"); exontrol.EXG2ANTTLib.Column var_Column = (exg2antt1.Columns.Add("Start") as exontrol.EXG2ANTTLib.Column); var_Column.set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,1); var_Column.Visible = false; var_Column.Alignment = exontrol.EXG2ANTTLib.AlignmentEnum.LeftAlignment; var_Column.set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellBackColor,12500670); exontrol.EXG2ANTTLib.Column var_Column1 = (exg2antt1.Columns.Add("End") as exontrol.EXG2ANTTLib.Column); var_Column1.set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,2); var_Column1.Visible = false; var_Column1.Alignment = exontrol.EXG2ANTTLib.AlignmentEnum.RightAlignment; var_Column1.set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellBackColor,12500670); exontrol.EXG2ANTTLib.Chart var_Chart = exg2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("12/31/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.LevelCount = 2; var_Chart.set_PaneWidth(false,48); var_Chart.ColumnsFormatLevel = "1:52,|,2:52"; exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; var_Items.AllowCellValueToItemBar = true; var_Items.AddBar(var_Items.AddItem("Task 1"),"Task",Convert.ToDateTime("1/3/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.AddBar(var_Items.AddItem("Task 2"),"Task",Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); exg2antt1.EndUpdate(); |
1743 |
How can I display the control's content on an single A3 paper size, when using PDF format
exg2antt1.BeginUpdate(); exg2antt1.Columns.Add("Task"); exg2antt1.AntiAliasing = true; exontrol.EXG2ANTTLib.Chart var_Chart = exg2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("12/24/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,96); var_Chart.LevelCount = 2; var_Chart.UnitScale = exontrol.EXG2ANTTLib.UnitEnum.exDay; exontrol.EXG2ANTTLib.Bar var_Bar = var_Chart.Bars["Task"]; var_Bar.Pattern = exontrol.EXG2ANTTLib.PatternEnum.exPatternSolid; var_Bar.Color = Color.FromArgb(0,0,0); var_Bar.Height = 16; exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; int h = var_Items.AddItem("Task 1"); var_Items.AddBar(h,"Task",Convert.ToDateTime("12/25/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"1","<fgcolor=FFFFFF>Center"); var_Items.set_ItemBar(h,"1",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaption,"left"); var_Items.set_ItemBar(h,"1",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaptionHAlign,16); h = var_Items.AddItem("Task 2"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/16/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"1","<fgcolor=FFFFFF>Center"); h = var_Items.AddItem("Task 3"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/16/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/26/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"2","Center"); var_Items.set_ItemBar(h,"2",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaption,"right"); var_Items.set_ItemBar(h,"2",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaptionHAlign,18); exontrol.EXG2ANTTLib.Notes var_Notes = exg2antt1.Chart.Notes; exontrol.EXG2ANTTLib.Note var_Note = var_Notes.Add("1S",exg2antt1.Items[1],"1","<%m3%>-<%d%>"); var_Note.set_PartShadow(exontrol.EXG2ANTTLib.NotePartEnum.exNoteEnd,false); var_Note.set_PartHOffset(exontrol.EXG2ANTTLib.NotePartEnum.exNoteEnd,-16); var_Note.set_PartVOffset(exontrol.EXG2ANTTLib.NotePartEnum.exNoteEnd,4); exontrol.EXG2ANTTLib.Note var_Note1 = var_Notes.Add("1F",exg2antt1.Items[1],"1","<%m3%>-<%d%>"); var_Note1.RelativePosition = 1; var_Note1.set_PartShadow(exontrol.EXG2ANTTLib.NotePartEnum.exNoteEnd,false); var_Note1.set_PartHOffset(exontrol.EXG2ANTTLib.NotePartEnum.exNoteEnd,16); var_Note1.set_PartVOffset(exontrol.EXG2ANTTLib.NotePartEnum.exNoteEnd,-4); object var_CopyTo = exg2antt1.get_CopyTo("C:\\Temp\\Preview.pdf|11.69 in x 16.53 in||single"); System.Diagnostics.Debug.Print( "Look for C:\\Temp\\Preview.pd file." ); exg2antt1.EndUpdate(); |
1742 |
How can I display the control's content on an A3 paper size, when using PDF format
exg2antt1.BeginUpdate(); exg2antt1.Columns.Add("Task"); exg2antt1.AntiAliasing = true; exontrol.EXG2ANTTLib.Chart var_Chart = exg2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("12/24/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,96); var_Chart.LevelCount = 2; var_Chart.UnitScale = exontrol.EXG2ANTTLib.UnitEnum.exDay; exontrol.EXG2ANTTLib.Bar var_Bar = var_Chart.Bars["Task"]; var_Bar.Pattern = exontrol.EXG2ANTTLib.PatternEnum.exPatternSolid; var_Bar.Color = Color.FromArgb(0,0,0); var_Bar.Height = 16; exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; int h = var_Items.AddItem("Task 1"); var_Items.AddBar(h,"Task",Convert.ToDateTime("12/25/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"1","<fgcolor=FFFFFF>Center"); var_Items.set_ItemBar(h,"1",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaption,"left"); var_Items.set_ItemBar(h,"1",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaptionHAlign,16); h = var_Items.AddItem("Task 2"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/16/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"1","<fgcolor=FFFFFF>Center"); h = var_Items.AddItem("Task 3"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/16/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/26/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"2","Center"); var_Items.set_ItemBar(h,"2",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaption,"right"); var_Items.set_ItemBar(h,"2",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaptionHAlign,18); exontrol.EXG2ANTTLib.Notes var_Notes = exg2antt1.Chart.Notes; exontrol.EXG2ANTTLib.Note var_Note = var_Notes.Add("1S",exg2antt1.Items[1],"1","<%m3%>-<%d%>"); var_Note.set_PartShadow(exontrol.EXG2ANTTLib.NotePartEnum.exNoteEnd,false); var_Note.set_PartHOffset(exontrol.EXG2ANTTLib.NotePartEnum.exNoteEnd,-16); var_Note.set_PartVOffset(exontrol.EXG2ANTTLib.NotePartEnum.exNoteEnd,4); exontrol.EXG2ANTTLib.Note var_Note1 = var_Notes.Add("1F",exg2antt1.Items[1],"1","<%m3%>-<%d%>"); var_Note1.RelativePosition = 1; var_Note1.set_PartShadow(exontrol.EXG2ANTTLib.NotePartEnum.exNoteEnd,false); var_Note1.set_PartHOffset(exontrol.EXG2ANTTLib.NotePartEnum.exNoteEnd,16); var_Note1.set_PartVOffset(exontrol.EXG2ANTTLib.NotePartEnum.exNoteEnd,-4); object var_CopyTo = exg2antt1.get_CopyTo("C:\\Temp\\Preview.pdf|11.69 in x 16.53 in"); System.Diagnostics.Debug.Print( "Look for C:\\Temp\\Preview.pd file." ); exg2antt1.EndUpdate(); |
1741 |
How can I specify the grouping strategy, ie numbers from 1 to 5 are given the value (1-5) and grouping is done on this new value
// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection. private void exg2antt1_AddGroupItem(object sender,int Item) { exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; var_Items.set_ItemBold(Item,true); var_Items.AddBar(Item,"Summary",var_Items.get_CellValue(Item,1),var_Items.get_CellValue(Item,2),null,null); var_Items.DefineSummaryBars(Item,"",-3,""); } //this.exg2antt1.AddGroupItem += new exontrol.EXG2ANTTLib.exg2antt.AddGroupItemEventHandler(this.exg2antt1_AddGroupItem); exg2antt1.BeginUpdate(); exg2antt1.AllowGroupBy = true; exg2antt1.SortBarVisible = true; exg2antt1.MarkSearchColumn = false; exontrol.EXG2ANTTLib.Columns var_Columns = exg2antt1.Columns; var_Columns.Add("Tasks"); exontrol.EXG2ANTTLib.Column var_Column = (var_Columns.Add("Start") as exontrol.EXG2ANTTLib.Column); var_Column.set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,1); var_Column.AllowGroupBy = false; exontrol.EXG2ANTTLib.Column var_Column1 = (var_Columns.Add("End") as exontrol.EXG2ANTTLib.Column); var_Column1.set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,2); var_Column1.AllowGroupBy = false; exontrol.EXG2ANTTLib.Chart var_Chart = exg2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("9/20/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.LevelCount = 2; var_Chart.set_PaneWidth(false,256); exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; var_Items.AllowCellValueToItemBar = true; var_Items.AddBar(var_Items.AddItem("1"),"Task",Convert.ToDateTime("9/21/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("9/27/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.AddBar(var_Items.AddItem("1"),"Task",Convert.ToDateTime("9/22/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("9/28/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.AddBar(var_Items.AddItem("2"),"Task",Convert.ToDateTime("9/22/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("9/28/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.AddBar(var_Items.AddItem("2"),"Task",Convert.ToDateTime("9/23/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("9/29/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.AddBar(var_Items.AddItem("3"),"Task",Convert.ToDateTime("9/25/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("9/29/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.AddBar(var_Items.AddItem("3"),"Task",Convert.ToDateTime("9/26/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("9/30/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); exontrol.EXG2ANTTLib.Column var_Column2 = (exg2antt1.Columns.Add("Tasks - Group") as exontrol.EXG2ANTTLib.Column); var_Column2.Visible = false; var_Column2.FormatColumn = "%0 in (1,2) ? `1 - 2` : `3 -`"; var_Column2.SortOrder = exontrol.EXG2ANTTLib.SortOrderEnum.SortAscending; exg2antt1.EndUpdate(); |
1740 |
How can I filter the chart and its content, not the items section
// RClick event - Fired when right mouse button is clicked private void exg2antt1_RClick(object sender) { exg2antt1.Columns["Start"].ShowFilter("-1,-1,128,128"); } //this.exg2antt1.RClick += new exontrol.EXG2ANTTLib.exg2antt.RClickEventHandler(this.exg2antt1_RClick); exg2antt1.BeginUpdate(); exg2antt1.SortBarVisible = true; exg2antt1.MarkSearchColumn = false; exontrol.EXG2ANTTLib.Columns var_Columns = exg2antt1.Columns; var_Columns.Add("Tasks"); exontrol.EXG2ANTTLib.Column var_Column = (var_Columns.Add("Start") as exontrol.EXG2ANTTLib.Column); var_Column.set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,1); var_Column.DisplayFilterDate = true; var_Column.DisplayFilterPattern = false; var_Column.FilterList = exontrol.EXG2ANTTLib.FilterListEnum.exShowExclude | exontrol.EXG2ANTTLib.FilterListEnum.exShowCheckBox; var_Column.Visible = false; exontrol.EXG2ANTTLib.Column var_Column1 = (var_Columns.Add("End") as exontrol.EXG2ANTTLib.Column); var_Column1.set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,2); var_Column1.DisplayFilterDate = true; var_Column1.DisplayFilterPattern = false; var_Column1.Visible = false; var_Column1.FilterList = exontrol.EXG2ANTTLib.FilterListEnum.exShowExclude | exontrol.EXG2ANTTLib.FilterListEnum.exShowCheckBox; var_Column1.Visible = false; exontrol.EXG2ANTTLib.Chart var_Chart = exg2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("9/20/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.LevelCount = 2; var_Chart.set_PaneWidth(false,128); exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; var_Items.AllowCellValueToItemBar = true; var_Items.AddBar(var_Items.AddItem("Task 1"),"Task",Convert.ToDateTime("9/21/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("9/27/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.AddBar(var_Items.AddItem("Task 2"),"Task",Convert.ToDateTime("9/22/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("9/28/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.AddBar(var_Items.AddItem("Task 3"),"Task",Convert.ToDateTime("9/22/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("9/28/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.AddBar(var_Items.AddItem("Task 4"),"Task",Convert.ToDateTime("9/23/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("9/29/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.AddBar(var_Items.AddItem("Task 5"),"Task",Convert.ToDateTime("9/25/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("9/29/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.AddBar(var_Items.AddItem("Task 6"),"Task",Convert.ToDateTime("9/26/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("9/30/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); exg2antt1.EndUpdate(); |
1739 |
How do I enable the Group-By feature
// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection. private void exg2antt1_AddGroupItem(object sender,int Item) { exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; var_Items.set_ItemBackColor(Item,Color.FromArgb(240,240,240)); exg2antt1.Chart.set_ItemBackColor(Item,Color.FromArgb(240,240,240)); var_Items.set_ItemDividerLine(Item,exontrol.EXG2ANTTLib.DividerLineEnum.EmptyLine); var_Items.AddBar(Item,"Summary",var_Items.get_CellValue(Item,1),var_Items.get_CellValue(Item,2),null,null); var_Items.DefineSummaryBars(Item,"",-3,""); } //this.exg2antt1.AddGroupItem += new exontrol.EXG2ANTTLib.exg2antt.AddGroupItemEventHandler(this.exg2antt1_AddGroupItem); exg2antt1.BeginUpdate(); exg2antt1.AllowGroupBy = true; exg2antt1.SortBarVisible = true; exg2antt1.MarkSearchColumn = false; exontrol.EXG2ANTTLib.Columns var_Columns = exg2antt1.Columns; var_Columns.Add("Tasks"); exontrol.EXG2ANTTLib.Column var_Column = (var_Columns.Add("Start") as exontrol.EXG2ANTTLib.Column); var_Column.set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,1); var_Column.AllowGroupBy = false; exontrol.EXG2ANTTLib.Column var_Column1 = (var_Columns.Add("End") as exontrol.EXG2ANTTLib.Column); var_Column1.set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,2); var_Column1.AllowGroupBy = false; exontrol.EXG2ANTTLib.Chart var_Chart = exg2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("9/20/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.LevelCount = 2; var_Chart.set_PaneWidth(false,256); exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; var_Items.AllowCellValueToItemBar = true; var_Items.AddBar(var_Items.AddItem("Task 1"),"Task",Convert.ToDateTime("9/21/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("9/27/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.AddBar(var_Items.AddItem("Task 1"),"Task",Convert.ToDateTime("9/22/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("9/28/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.AddBar(var_Items.AddItem("Task 2"),"Task",Convert.ToDateTime("9/22/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("9/28/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.AddBar(var_Items.AddItem("Task 2"),"Task",Convert.ToDateTime("9/23/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("9/29/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.AddBar(var_Items.AddItem("Task 3"),"Task",Convert.ToDateTime("9/25/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("9/29/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.AddBar(var_Items.AddItem("Task 3"),"Task",Convert.ToDateTime("9/26/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("9/30/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); exg2antt1.Columns[0].SortOrder = exontrol.EXG2ANTTLib.SortOrderEnum.SortAscending; exg2antt1.EndUpdate(); |
1738 |
Is there any method to know number/length/count/duration of working days in a bar ( excluding non-working days)
// SelectionChanged event - Fired after a new item has been selected. private void exg2antt1_SelectionChanged(object sender) { exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; System.Diagnostics.Debug.Print( var_Items.get_CellCaption(var_Items.FocusItem,0) ); System.Diagnostics.Debug.Print( var_Items.get_ItemBar(var_Items.FocusItem,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarWorkingCount).ToString() ); } //this.exg2antt1.SelectionChanged += new exontrol.EXG2ANTTLib.exg2antt.SelectionChangedEventHandler(this.exg2antt1_SelectionChanged); exg2antt1.BeginUpdate(); exg2antt1.SelBackColor = Color.FromArgb(142,190,255); exg2antt1.SelForeColor = Color.FromArgb(0,0,0); exontrol.EXG2ANTTLib.Chart var_Chart = exg2antt1.Chart; var_Chart.set_PaneWidth(false,96); var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2002",System.Globalization.CultureInfo.GetCultureInfo("en-US")); exontrol.EXG2ANTTLib.Bar var_Bar = var_Chart.Bars.Add("Task:Split"); var_Bar.Shortcut = "Task"; var_Bar.set_Def(exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption,"<%=%258%><font ;6><off 3>w/units"); var_Bar.set_Def(exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,18); var_Chart.SelBackColor = exg2antt1.SelBackColor; exg2antt1.Columns.Add("Task"); exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; int h = var_Items.AddItem("Task A"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2002",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/9/2002",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); h = var_Items.AddItem("Task B"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/3/2002",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2002",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.set_SelectItem(h,true); h = var_Items.AddItem("Task C"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/4/2002",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2002",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); exg2antt1.EndUpdate(); |
1737 |
How do i verify weather specified unit is Nonworking Working Unit
// MouseMove event - Occurs when the user moves the mouse. private void exg2antt1_MouseMoveEvent(object sender,short Button,short Shift,int X,int Y) { int h = exg2antt1.get_ItemFromPoint(-1,-1,c,hit); Date d = exg2antt1.Chart.get_DateFromPoint(-1,-1); System.Diagnostics.Debug.Print( d.ToString() ); System.Diagnostics.Debug.Print( exg2antt1.Chart.get_IsNonworkingDate(d,h).ToString() ); } //this.exg2antt1.MouseMoveEvent += new exontrol.EXG2ANTTLib.exg2antt.MouseMoveEventHandler(this.exg2antt1_MouseMoveEvent); exg2antt1.BeginUpdate(); exg2antt1.Columns.Add("NonWorking"); exontrol.EXG2ANTTLib.Chart var_Chart = exg2antt1.Chart; var_Chart.FirstWeekDay = exontrol.EXG2ANTTLib.WeekDayEnum.exMonday; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/24/2008",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,64); var_Chart.LevelCount = 2; exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; int h = var_Items.AddItem("Default"); h = var_Items.AddItem("January"); var_Items.set_ItemNonworkingUnits(h,false,"month(value) = 1"); h = var_Items.AddItem("February, Saturday, Sunday"); var_Items.set_ItemNonworkingUnits(h,false,"month(value) = 2 or (weekday(value) = 0 or weekday(value) = 6)"); h = var_Items.AddItem("Sunday"); var_Items.set_ItemNonworkingUnits(h,false,"weekday(value) = 0"); exg2antt1.EndUpdate(); |
1736 |
How can I specify the bar's caption to be caption from a column/cell
// Change event - Occurs when the user changes the cell's content. private void exg2antt1_Change(object sender,int Item,int ColIndex,ref object NewValue) { exg2antt1.Refresh(); } //this.exg2antt1.Change += new exontrol.EXG2ANTTLib.exg2antt.ChangeEventHandler(this.exg2antt1_Change); exg2antt1.BeginUpdate(); exontrol.EXG2ANTTLib.Chart var_Chart = exg2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,64); exontrol.EXG2ANTTLib.Bar var_Bar = var_Chart.Bars["Task"]; var_Bar.set_Def(exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption,"<fgcolor=808080><%=%C0%>"); var_Bar.set_Def(exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption,18); exontrol.EXG2ANTTLib.Editor var_Editor = (exg2antt1.Columns.Add("Task") as exontrol.EXG2ANTTLib.Column).Editor; var_Editor.EditType = exontrol.EXG2ANTTLib.EditTypeEnum.DropDownListType; var_Editor.AddItem(1,"Aka",null); var_Editor.AddItem(2,"Baka",null); var_Editor.AddItem(3,"Taka",null); exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; var_Items.AddBar(var_Items.AddItem(1),"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.AddBar(var_Items.AddItem(2),"Task",Convert.ToDateTime("1/3/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.AddBar(var_Items.AddItem(3),"Task",Convert.ToDateTime("1/4/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); exg2antt1.EndUpdate(); |
1735 |
The histogram values displayed on the chart are using 2 decimal places. Can this be formated to just 0 decimal place, so 86.79% becomes 87%
exg2antt1.BeginUpdate(); exg2antt1.Columns.Add("Tasks"); exontrol.EXG2ANTTLib.Column var_Column = (exg2antt1.Columns.Add("Effort") as exontrol.EXG2ANTTLib.Column); var_Column.set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,21); var_Column.Editor.EditType = exontrol.EXG2ANTTLib.EditTypeEnum.SpinType; exontrol.EXG2ANTTLib.Chart var_Chart = exg2antt1.Chart; var_Chart.LevelCount = 2; var_Chart.NonworkingDays = 0; var_Chart.set_PaneWidth(false,96); var_Chart.FirstVisibleDate = Convert.ToDateTime("6/20/2005",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.HistogramVisible = true; var_Chart.HistogramHeight = 128; var_Chart.HistogramView = exontrol.EXG2ANTTLib.HistogramViewEnum.exHistogramAllItems; exontrol.EXG2ANTTLib.Bar var_Bar = var_Chart.Bars["Task"]; var_Bar.HistogramPattern = var_Bar.Pattern; var_Bar.HistogramType = exontrol.EXG2ANTTLib.HistogramTypeEnum.exHistOverload; var_Bar.HistogramCriticalValue = 3; var_Bar.ShowHistogramValues = "value>3?255:1"; var_Bar.HistogramItems = -11; var_Bar.HistogramGridLinesColor = Color.FromArgb(192,192,192); var_Bar.HistogramRulerLinesColor = Color.FromArgb(0,0,1); var_Bar.FormatHistogramValues = "(value format `0`) + ` units`"; exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; var_Items.AllowCellValueToItemBar = true; int h1 = var_Items.AddItem("Task 1"); var_Items.AddBar(h1,"Task",Convert.ToDateTime("6/21/2005",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("6/23/2005",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.set_CellValue(h1,1,6.79); h1 = var_Items.AddItem("Task 2"); var_Items.AddBar(h1,"Task",Convert.ToDateTime("6/24/2005",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("6/26/2005",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.set_CellValue(h1,1,3.19); h1 = var_Items.AddItem("Task 3"); var_Items.AddBar(h1,"Task",Convert.ToDateTime("6/27/2005",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("6/29/2005",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.set_CellValue(h1,1,2); h1 = var_Items.AddItem("Task 4"); var_Items.AddBar(h1,"Task",Convert.ToDateTime("6/30/2005",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("7/2/2005",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.set_CellValue(h1,1,1); exg2antt1.EndUpdate(); |
1734 |
How can I create a relative time-scale
exg2antt1.BeginUpdate(); exg2antt1.DefaultItemHeight = 24; exg2antt1.HeaderHeight = exg2antt1.DefaultItemHeight; exg2antt1.GridLineStyle = exontrol.EXG2ANTTLib.GridLinesStyleEnum.exGridLinesSolid; exg2antt1.DrawGridLines = exontrol.EXG2ANTTLib.GridLinesEnum.exAllLines; exg2antt1.LinesAtRoot = exontrol.EXG2ANTTLib.LinesAtRootEnum.exNoLinesAtRoot; exg2antt1.BackColorLevelHeader = exg2antt1.BackColor; exontrol.EXG2ANTTLib.Chart var_Chart = exg2antt1.Chart; var_Chart.DrawGridLines = exontrol.EXG2ANTTLib.GridLinesEnum.exAllLines; var_Chart.GridLineStyle = exontrol.EXG2ANTTLib.GridLinesStyleEnum.exGridLinesSolid; var_Chart.set_PaneWidth(false,128); var_Chart.LevelCount = 2; var_Chart.FirstVisibleDate = 0; var_Chart.NonworkingDays = 0; var_Chart.UnitWidth = 36; exontrol.EXG2ANTTLib.Level var_Level = var_Chart.get_Level(0); var_Level.Unit = exontrol.EXG2ANTTLib.UnitEnum.exDay; var_Level.Count = 6; var_Level.Alignment = exontrol.EXG2ANTTLib.AlignmentEnum.CenterAlignment; var_Level.Label = "<%i%>"; var_Level.FormatLabel = "'<b>' + ( (value / 6) array ('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec') ) + '-16'"; exontrol.EXG2ANTTLib.Level var_Level1 = var_Chart.get_Level(1); var_Level1.Label = "<%i%>"; var_Level1.FormatLabel = "1 + value mod 6 + ` `"; var_Level1.Alignment = exontrol.EXG2ANTTLib.AlignmentEnum.RightAlignment; var_Chart.AdjustLevelsToBase = true; var_Chart.set_ScrollRange(exontrol.EXG2ANTTLib.ScrollRangeEnum.exStartDate,0); var_Chart.set_ScrollRange(exontrol.EXG2ANTTLib.ScrollRangeEnum.exEndDate,95); exontrol.EXG2ANTTLib.Bar var_Bar = var_Chart.Bars["Task"]; var_Bar.Height = 15; var_Bar.Color = Color.FromArgb(252,213,180); var_Bar.Pattern = exontrol.EXG2ANTTLib.PatternEnum.exPatternSolid; var_Bar.set_Def(exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption,"date blocking"); exg2antt1.Columns.Add("Company"); exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; int h = var_Items.AddItem("ABC Company"); var_Items.set_ItemBackColor(h,Color.FromArgb(240,240,240)); exg2antt1.Chart.set_ItemBackColor(h,Color.FromArgb(240,240,240)); int hChild = var_Items.InsertItem(h,null,"line 1"); var_Items.AddBar(hChild,"Task",0,3,null,null); hChild = var_Items.InsertItem(h,null,"line 2"); var_Items.AddBar(hChild,"Task",3,5,"A",null); var_Items.AddBar(hChild,"Task",7,10,"B",null); hChild = var_Items.InsertItem(h,null,"line 3"); var_Items.AddBar(hChild,"Task",5,8,"A",null); var_Items.AddBar(hChild,"Task",9,12,"B",null); var_Items.set_ExpandItem(h,true); exg2antt1.EndUpdate(); |
1733 |
Extending the bar's visual appearance with additional objects, EBNs, using the exBarBackgroundExt and exBarBackgroundExtInflate
exg2antt1.BeginUpdate(); exg2antt1.DefaultItemHeight = 32; exontrol.EXG2ANTTLib.Appearance var_Appearance = exg2antt1.VisualAppearance; var_Appearance.Add(1,"gBFLBCJwBAEHhEJAADhABcMIQAAYAQGKIYBkAKBQAGaAoDDUMQyQwAAyDAK8EwsACEIrAAJoaAAPoJRDGMTvfIgARIf6MIRAeCYFDAJQtDCMICwSKsXBaGwBJYGGaYE" + "DGHQATxKM7wGBcEyLDSgXZDQRAAoqTI/SICEIlAZJRjoOo5DJGGQmChkQhNVzGQzQSJFDTNAaEAwidDJCoOGgkBw7NwXFaNZznBK7LpvK5HNrie55XzAcj3dbmAYJQzB" + "JLxKSIDwCd6NXrCOJ5HhWDzjQjJMozLC8YiPG6fZRbeT4ToGNdXYhJWiyLiFeYtVzSMj1fD9Ir/EakbLtey4Lq2A53RzdHThSQpCwPA4BgIA="); var_Appearance.Add(2,"gBFLBCJwBAEHhEJAADhABcMIQAAYAQGKIYBkAKBQAGaAoDDUMQyQwAAyDAK8EwsACEIrAAJoaAAPoJRDGMTvfIgARIf6MIRAeCYFDAJQtDCMICwSKsXBaGwBJYGGaYE" + "DGHQATxKM7wGBcEyLDSgXZDQRAAoqTI/SICEIlAZJRjoOo5DJGGQmChkQhNVzGQzQSJFDTNAaEAwidDJCoOGgkBw7NrXHZ9YwTOC5IDke67cr2J53XZAd4QTb2Cz7QC8" + "QAvDA7awafM1MSuHIcOw/AqTYDkTq4XjODYhTDEc4zPLcFx/I6haBoWCSLi+T5VVrRMo1TKtRxnNaubZqO5aRrGe5NW6EXThSQpCr+f4BgIA="); var_Appearance.Add(3,"gBFLBCJwBAEHhEJAADhABcMIQAAYAQGKIYBkAKBQAGaAoDDUMQyQwAAyDAK8EwsACEIrAAJoaAAPoJRDGMTvfIgARIf6MIRAeCYFDAJQtDCMICwSKsXBaGwBJYGGaYE" + "DGHQATxKM7wGBcEyLDSgXZDQRAAoqTI/SICEIlAZJRjoOo5DJGGQmChkQhNVzGQzQSJFDTNAaEAwidDJCoOGgkBw7NwXFaNZznBK7LpvK5HNrie55XxfV6YBa8B4JPaE" + "ZLwLB7dwaf6IQLiWLYHiAAYZRKTcxlDI8AwvFaaZjnWA5ZaOMZBU7RNRyHR9IyTDaWaTqeqbHIuJ4FUzaNY2fZrOz2F6FAA6cKSFIWFYVAMBA"); var_Appearance.Add(4,"gBFLBCJwBAEHhEJAADhABb8IQAAYAQGKIYBkAKBQAGaAoDDUMQyQwAAyDAK8EwsACEIrAAJoaAAPoJRDGMTvfIgARIf6MIRAeCYFDAJQtDCMICwSKsXBaGwBJYGGaYE" + "DGHQATxKM7wGBcEyLDSgXZDQRAAoqTI/SICEIlAZJRjoOo5DJGGQmChkQhNVzGQzQSJFDTNAaEAwidDJCoOGgkBw7NwXFaNZznBK7LpvK5HNrie55XxfV6YBa8B4JPaE" + "ZLwLB7dwaf6IQLiWLYHiAAYBIbJI5yeb5Hx3HqfZjbeSxVoML43SzHcByGRcTwzC6pYjrGoZJpWZ4ZQrbNR3DZ8VzzNTrQxIUhYVhUAkB"); var_Appearance.RenderType = 0xff000000; exontrol.EXG2ANTTLib.Chart var_Chart = exg2antt1.Chart; var_Chart.set_PaneWidth(false,164); var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.NonworkingDaysColor = Color.FromArgb(240,240,240); var_Chart.NonworkingDaysPattern = exontrol.EXG2ANTTLib.PatternEnum.exPatternBDiagonal; exontrol.EXG2ANTTLib.Bar var_Bar = var_Chart.Bars["Task"]; var_Bar.Height = 17; var_Bar.Color = Color.FromArgb(255,255,255); var_Bar.Pattern = exontrol.EXG2ANTTLib.PatternEnum.exPatternSolid; var_Bar.set_Def(exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarFrameColor,1); exg2antt1.Columns.Add("Column"); exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; var_Items.AddBar(var_Items.AddItem("Task"),"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"",null); int h = var_Items.AddItem("Task+Rhombus(red)"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"",null); var_Items.set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarBackgroundExt,"none[(100%-11,50%-6,11,11),back=0x10000FF]"); var_Items.set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarBackgroundExtInflate,",,5"); h = var_Items.AddItem("Rhombus(red)+Task"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"",null); var_Items.set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarBackgroundExt,"none[(0,50%-6,11,11),back=0x10000FF]"); var_Items.set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarBackgroundExtInflate,"-5"); h = var_Items.AddItem("Task(yellow)+Rhombus(blue)"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/9/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"",null); var_Items.set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarBackgroundExt,"none[(100%-11,50%-6,11,11),back=0x1FF0000]"); var_Items.set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarBackgroundExtInflate,",,5"); var_Items.set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarColor,65535); h = var_Items.AddItem("Rhombus(blue)+Task(yellow)"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"",null); var_Items.set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarBackgroundExt,"none[(0,50%-6,11,11),back=0x1FF0000]"); var_Items.set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarBackgroundExtInflate,"-5"); var_Items.set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarColor,65535); h = var_Items.AddItem("TriangleUp(white)+Task"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"",null); var_Items.set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarBackgroundExt,"none[(0,50%-6,11,11),back=0x2FFFFFF]"); var_Items.set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarBackgroundExtInflate,"-5"); h = var_Items.AddItem("TriangleUp(blue)+Task(magenta)+TriangleDown(red)"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"",null); var_Items.set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarBackgroundExt,"none[(0,50%-6,11,11),back=0x02FF0000],none[(100%-11,50%-6,11,11),back=0x030000FF]"); var_Items.set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarBackgroundExtInflate,"-5,0,5,0"); var_Items.set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarColor,16744703); h = var_Items.AddItem("Rhombus+Task+TriangleDown"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"",null); var_Items.set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarBackgroundExt,"none[(0,50%-6,11,11),back=0x01FF0000],none[(100%-11,50%-6,11,11),back=0x030000FF]"); var_Items.set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarBackgroundExtInflate,"-5, 0,5,0"); var_Items.set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarColor,16744448); h = var_Items.AddItem("Rhombus+Task+TriangleDown"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"",null); var_Items.set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarBackgroundExt,"none[(50%-6,0,11,11),back=0x01FF0000],none[(50%-6,100%-11,11,11),back=0x010000FF]"); var_Items.set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarBackgroundExtInflate,"0,-5,0,5"); h = var_Items.AddItem("Task+Star"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/9/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"",null); var_Items.set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarBackgroundExt,"none[(100%-11,0,11,11),back=0x4FFFFFF]"); var_Items.set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarBackgroundExtInflate,5); h = var_Items.AddItem("Star+Task"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"",null); var_Items.set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarBackgroundExt,"none[(0,100%-11,11,11),back=0x04FFFFFF]"); var_Items.set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarBackgroundExtInflate,5); h = var_Items.AddItem("Task+Star"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/7/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"",null); var_Items.set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarBackgroundExt,"none[(100%-11,0,11,11),back=0x4FFFFFF]"); var_Items.set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarBackgroundExtInflate,"0,-6,14"); exg2antt1.EndUpdate(); |
1732 |
I am using the ItemBar(exBarFrameColor) to display an additional EBN on the current bar. The problem is that I still need a black frame around the bar. How can I achieve that
exg2antt1.BeginUpdate(); exontrol.EXG2ANTTLib.Appearance var_Appearance = exg2antt1.VisualAppearance; var_Appearance.Add(1,"gBFLBCJwBAEHhEJAADhABXMIQAAYAQGKIYBkAKBQAGaAoDDWDoMAANAyjPBMKgBBCLAACaKQAD6CYQRhFT7yGAERr/C6EQLhGBRQCULQxDCBMIjLJoWhsASVRhnCBBR" + "hwAI7ShPUBgXBNCQzICTJJkSJZBiECIJFAaJhnIapZDKGKQWCjAgiNpqGQ2QiKFC2HAcEAxCxGJBoKKZGq2bpJQLbdxUXRVZzpNi7Louay5CrOCZvXxaeAXDa+Az5ODD" + "MRwLBcKhzCKDYzfdrZFaWFT3Qi8aCvG6sbw/HZ0OrEEIwCEBA"); var_Appearance.Add(2,"CP:1 0 0 5 0"); var_Appearance.Add(3,"gBFLBCJwBAEHhEJAADhABUEIQAAYAQGKIYBkAKBQAGaAoDDWDoMAANAyjPBMKgBBCLIxhEYobgmGIaRiBMIxAKIZhzEgYRoiAYhXDiHwxARHUgRfIEOwHDiBZomWKZE" + "iaKIqRrLMryFLMZx3CqcAApGaqHiOCYlSbTcoyfJYZBzD6mKJpWipWheW48U7PVRDJSkNysASZIyrGKqJouX4WR7BcZgNR4YBgEoWRouSBLWrgNIVR6/eBABZFPzbNK3" + "ZzdOIIJgEgIA="); var_Appearance.RenderType = 0xff000000; exontrol.EXG2ANTTLib.Chart var_Chart = exg2antt1.Chart; var_Chart.set_PaneWidth(false,164); var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.Bars["Task"].Color32 = 0x3ff0000; var_Chart.Bars.Copy("Task","NewTask").Height = 15; exg2antt1.Columns.Add("Column"); exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; int h = var_Items.AddItem("Task"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.AddBar(h,"NewTask",Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/12/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"new",null); h = var_Items.AddItem("Task+Rhombus"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarFrameColor,33554432); var_Items.AddBar(h,"NewTask",Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/12/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"new",null); var_Items.set_ItemBar(h,"new",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarFrameColor,33554432); h = var_Items.AddItem("Task/Color+Rhombus"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarFrameColor,33554687); var_Items.set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarColor,65280); var_Items.AddBar(h,"NewTask",Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/12/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"new",null); var_Items.set_ItemBar(h,"new",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarFrameColor,33554687); var_Items.set_ItemBar(h,"new",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarColor,65280); h = var_Items.AddItem("Task/Color+Rhombus/Color"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarFrameColor,33619712); var_Items.set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarColor,16711935); var_Items.AddBar(h,"NewTask",Convert.ToDateTime("1/8/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/12/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),"new",null); var_Items.set_ItemBar(h,"new",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarFrameColor,33619712); var_Items.set_ItemBar(h,"new",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarColor,16711935); exg2antt1.EndUpdate(); |
1731 |
I am using EBN objects to show my bars, but when apply a color to the EBN looks darker. Is it possible to get the same color brightness
exg2antt1.BeginUpdate(); exontrol.EXG2ANTTLib.Appearance var_Appearance = exg2antt1.VisualAppearance; var_Appearance.Add(1,"gBFLBCJwBAEHhEJAADhABWkIQAAYAQGKIYBkAKBQAGaAoDDWDoMAANAyjPBMKgBBCLAACaKQAD6CYQRhFT7yGAERr/C6EZBGABYJDUMAlCyNQBQSKIYxnAgYY4ACZ5I" + "jqAwLQjQEYzZI0SxJCqQZBBCCSQKkYx0HScRijDILBQwIQmaqjEZoJCiQZfQLCAYRMhkQx9DKTLRtKhYDqubpHUZbdwWRaVYTlM6RLbhGy7YqefJtXLfN4WZgWCz9QLD" + "I4wS78JruaqOW5hVz4BasfTrOzLcTzG4HLhCCYBgI"); var_Appearance.Add(2,"CP:1 -6 0 0 0"); var_Appearance.RenderType = 0xff000000; exontrol.EXG2ANTTLib.Chart var_Chart = exg2antt1.Chart; var_Chart.set_PaneWidth(false,164); var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); exg2antt1.Columns.Add("Column"); exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; int h = var_Items.AddItem("Task"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); h = var_Items.AddItem("Task+Rhombus"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarFrameColor,33554432); h = var_Items.AddItem("Task/Color+Rhombus"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarFrameColor,33554687); var_Items.set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarColor,65280); h = var_Items.AddItem("Task/Color+Rhombus/Color"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarFrameColor,33619712); var_Items.set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarColor,16711935); exg2antt1.EndUpdate(); |
1730 |
The ItemBar(exBarColor) changes the color for margins, and there is no exBarStartColor/exBarEndColor. However in my case I would then like do dynamically change the bar color to a different color without changing the start shape color
exg2antt1.BeginUpdate(); exontrol.EXG2ANTTLib.Appearance var_Appearance = exg2antt1.VisualAppearance; var_Appearance.Add(1,"gBFLBCJwBAEHhEJAADhABWkIQAAYAQGKIYBkAKBQAGaAoDDWDoMAANAyjPBMKgBBCLAACaKQAD6CYQRhFT7yGAERr/C6EZBGABYJDUMAlCyNQBQSKIYxnAgYY4ACZ5I" + "jqAwLQjQEYzZI0SxJCqQZBBCCSQKkYx0HScRijDILBQwIQmaqjEZoJCiQZfQLCAYRMhkQx9DKTLRtKhYDqubpHUZbdwWRaVYTlM6RLbhGy7YqefJtXLfN4WZgWCz9QLD" + "I4wS78JruaqOW5hVz4BasfTrOzLcTzG4HLhCCYBgI"); var_Appearance.Add(2,"CP:1 -6 0 0 0"); exontrol.EXG2ANTTLib.Chart var_Chart = exg2antt1.Chart; var_Chart.set_PaneWidth(false,164); var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); exg2antt1.Columns.Add("Column"); exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; int h = var_Items.AddItem("Task"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); h = var_Items.AddItem("Task+Rhombus"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarFrameColor,33554432); h = var_Items.AddItem("Task/Color+Rhombus"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarFrameColor,33554432); var_Items.set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarColor,65280); h = var_Items.AddItem("Task/Color+Rhombus/Color"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarFrameColor,33619712); var_Items.set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarColor,16711935); exg2antt1.EndUpdate(); |
1729 |
The ItemBar(exBarColor) changes the color for margins, and there is no exBarStartColor/exBarEndColor. However in my case I would then like do dynamically change the bar color to a different color without changing the end shape color
exg2antt1.BeginUpdate(); exontrol.EXG2ANTTLib.Appearance var_Appearance = exg2antt1.VisualAppearance; var_Appearance.Add(1,"gBFLBCJwBAEHhEJAADhABXMIQAAYAQGKIYBkAKBQAGaAoDDWDoMAANAyjPBMKgBBCLAACaKQAD6CYQRhFT7yGAERr/C6EQLhGBRQCULQxDCBMIjLJoWhsASVRhnCBBR" + "hwAI7ShPUBgXBNCQzICTJJkSJZBiECIJFAaJhnIapZDKGKQWCjAgiNpqGQ2QiKFC2HAcEAxCxGJBoKKZGq2bpJQLbdxUXRVZzpNi7Louay5CrOCZvXxaeAXDa+Az5ODD" + "MRwLBcKhzCKDYzfdrZFaWFT3Qi8aCvG6sbw/HZ0OrEEIwCEBA"); var_Appearance.Add(2,"CP:1 0 0 6 0"); exontrol.EXG2ANTTLib.Chart var_Chart = exg2antt1.Chart; var_Chart.set_PaneWidth(false,164); var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); exg2antt1.Columns.Add("Column"); exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; int h = var_Items.AddItem("Task"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); h = var_Items.AddItem("Task+Rhombus"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarFrameColor,33554432); h = var_Items.AddItem("Task/Color+Rhombus"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarFrameColor,33554432); var_Items.set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarColor,65280); h = var_Items.AddItem("Task/Color+Rhombus/Color"); var_Items.AddBar(h,"Task",Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/6/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarFrameColor,33619712); var_Items.set_ItemBar(h,"",exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarColor,16711935); exg2antt1.EndUpdate(); |
1728 |
Is it possible to resize a column with the mouse without changing the width of the next column
exg2antt1.BeginUpdate(); exg2antt1.ColumnAutoResize = false; (exg2antt1.Columns.Add("Column 1") as exontrol.EXG2ANTTLib.Column).Width = 256; (exg2antt1.Columns.Add("Column 2") as exontrol.EXG2ANTTLib.Column).Width = 512; exg2antt1.DrawGridLines = exontrol.EXG2ANTTLib.GridLinesEnum.exAllLines; exg2antt1.EndUpdate(); |
1727 |
How can I align captions of items with checkbox, with items with no checkbox
exg2antt1.BeginUpdate(); exg2antt1.Columns.Add("Default"); exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; var_Items.set_CellImages(var_Items.AddItem(0),0,"1"); var_Items.set_CellHasCheckBox(var_Items.AddItem(1),0,true); var_Items.set_CellImages(var_Items.AddItem(2),0,"1"); exg2antt1.EndUpdate(); |
1726 |
How can I show each group header ( not-subroup ), with a different background color, while alternate background colors for inside items
// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection. private void exg2antt1_AddGroupItem(object sender,int Item) { exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; var_Items.AddBar(Item,"Summary",var_Items.get_CellValue(Item,2),var_Items.get_CellValue(Item,4),null,null); var_Items.DefineSummaryBars(Item,"",-3,""); } //this.exg2antt1.AddGroupItem += new exontrol.EXG2ANTTLib.exg2antt.AddGroupItemEventHandler(this.exg2antt1_AddGroupItem); // AddItem event - Occurs after a new Item has been inserted to Items collection. private void exg2antt1_AddItem(object sender,int Item) { exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; var_Items.AddBar(Item,"Task",var_Items.get_CellValue(Item,2),var_Items.get_CellValue(Item,4),null,null); } //this.exg2antt1.AddItem += new exontrol.EXG2ANTTLib.exg2antt.AddItemEventHandler(this.exg2antt1_AddItem); // LayoutChanged event - Occurs when column's position or column's size is changed. private void exg2antt1_LayoutChanged(object sender) { exg2antt1.Refresh(); } //this.exg2antt1.LayoutChanged += new exontrol.EXG2ANTTLib.exg2antt.LayoutChangedEventHandler(this.exg2antt1_LayoutChanged); exg2antt1.BeginUpdate(); exg2antt1.Chart.FirstVisibleDate = Convert.ToDateTime("9/1/1994",System.Globalization.CultureInfo.GetCultureInfo("en-US")); exg2antt1.Chart.set_PaneWidth(false,312); exg2antt1.BackColorSortBar = exg2antt1.BackColor; exg2antt1.ColumnAutoResize = false; // Add 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' reference to your project. ADODB.Recordset rs = new ADODB.Recordset(); rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access\\misc.accdb",exontrol.ADODB.CursorTypeEnum.adOpenStatic,exontrol.ADODB.LockTypeEnum.adLockOptimistic,0); exg2antt1.DataSource = (rs as ADODB.Recordset); exg2antt1.Items.AllowCellValueToItemBar = true; exg2antt1.Columns[2].set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,1); exg2antt1.Columns[4].set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,2); exg2antt1.SortBarVisible = true; exg2antt1.SortBarCaption = "Drag a <b>column</b> header here to group by that column."; exg2antt1.AllowGroupBy = true; exg2antt1.Columns[1].SortOrder = exontrol.EXG2ANTTLib.SortOrderEnum.SortAscending; exontrol.EXG2ANTTLib.Column var_Column = (exg2antt1.Columns.Add("Position") as exontrol.EXG2ANTTLib.Column); var_Column.FormatColumn = "(0:= (1 rpos '')) right ( ( 1:= ( =:0 rfind `.` ) ) != -1 ? =:1 : len(=:0))"; var_Column.Visible = false; exontrol.EXG2ANTTLib.Column var_Column1 = (exg2antt1.Columns.Add("Position") as exontrol.EXG2ANTTLib.Column); var_Column1.FormatColumn = "(1 rpos '') contains '.'"; var_Column1.Visible = false; exg2antt1.ConditionalFormats.Add("(%C13 mod 2) != 0",null).BackColor = Color.FromArgb(240,240,240); exg2antt1.ConditionalFormats.Add("%C14 = 0",null).BackColor = Color.FromArgb(190,190,190); exg2antt1.EndUpdate(); |
1725 |
What is the difference between %0 and %C0, when using in expressions ( format, conditional format, computed fields, and so on )
exg2antt1.BeginUpdate(); exg2antt1.Chart.set_PaneWidth(true,0); exg2antt1.HeaderAppearance = exontrol.EXG2ANTTLib.AppearanceEnum.Etched; exg2antt1.HeaderHeight = 24; exg2antt1.ScrollBySingleLine = true; exg2antt1.DrawGridLines = exontrol.EXG2ANTTLib.GridLinesEnum.exRowLines; (exg2antt1.Columns.Add("Value") as exontrol.EXG2ANTTLib.Column).set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueFormat,1); exontrol.EXG2ANTTLib.Column var_Column = (exg2antt1.Columns.Add("FormatColumn = `%0` ~ CellValue") as exontrol.EXG2ANTTLib.Column); var_Column.FormatColumn = "%0"; var_Column.set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellSingleLine,false); exontrol.EXG2ANTTLib.Column var_Column1 = (exg2antt1.Columns.Add("FormatColumn = `%C0`~ CellCaption") as exontrol.EXG2ANTTLib.Column); var_Column1.FormatColumn = "%C0"; var_Column1.set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellSingleLine,false); exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; var_Items.AddItem(1.1234); var_Items.set_CellValueFormat(var_Items.AddItem("<sha ;;0>This <fgcolor=FF0000>is a <s><b>HTM</fgcolor>L</b> text</s>."),0,exontrol.EXG2ANTTLib.ValueFormatEnum.exHTML); exontrol.EXG2ANTTLib.Editor var_Editor = var_Items.get_CellEditor(var_Items.AddItem(3),null); var_Editor.EditType = exontrol.EXG2ANTTLib.EditTypeEnum.CheckListType; var_Editor.AddItem(1,"Border",null); var_Editor.AddItem(2,"Thick",null); var_Editor.AddItem(4,"Shadow",null); var_Items.set_FormatCell(var_Items.AddItem(10000),0,"`<b>` + currency(value)"); exg2antt1.EndUpdate(); |
1724 |
How can I alternate colors for each group header ( not-subroup ), with a different background color, while items of the same group showing with a different color
// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection. private void exg2antt1_AddGroupItem(object sender,int Item) { exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; var_Items.AddBar(Item,"Summary",var_Items.get_CellValue(Item,2),var_Items.get_CellValue(Item,4),null,null); var_Items.DefineSummaryBars(Item,"",-3,""); } //this.exg2antt1.AddGroupItem += new exontrol.EXG2ANTTLib.exg2antt.AddGroupItemEventHandler(this.exg2antt1_AddGroupItem); // AddItem event - Occurs after a new Item has been inserted to Items collection. private void exg2antt1_AddItem(object sender,int Item) { exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; var_Items.AddBar(Item,"Task",var_Items.get_CellValue(Item,2),var_Items.get_CellValue(Item,4),null,null); } //this.exg2antt1.AddItem += new exontrol.EXG2ANTTLib.exg2antt.AddItemEventHandler(this.exg2antt1_AddItem); // LayoutChanged event - Occurs when column's position or column's size is changed. private void exg2antt1_LayoutChanged(object sender) { exg2antt1.Refresh(); } //this.exg2antt1.LayoutChanged += new exontrol.EXG2ANTTLib.exg2antt.LayoutChangedEventHandler(this.exg2antt1_LayoutChanged); exg2antt1.BeginUpdate(); exg2antt1.Chart.FirstVisibleDate = Convert.ToDateTime("9/1/1994",System.Globalization.CultureInfo.GetCultureInfo("en-US")); exg2antt1.Chart.set_PaneWidth(false,312); exg2antt1.BackColorSortBar = exg2antt1.BackColor; exg2antt1.ColumnAutoResize = false; // Add 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' reference to your project. ADODB.Recordset rs = new ADODB.Recordset(); rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access\\misc.accdb",exontrol.ADODB.CursorTypeEnum.adOpenStatic,exontrol.ADODB.LockTypeEnum.adLockOptimistic,0); exg2antt1.DataSource = (rs as ADODB.Recordset); exg2antt1.Items.AllowCellValueToItemBar = true; exg2antt1.Columns[2].set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,1); exg2antt1.Columns[4].set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,2); exg2antt1.SortBarVisible = true; exg2antt1.SortBarCaption = "Drag a <b>column</b> header here to group by that column."; exg2antt1.AllowGroupBy = true; exg2antt1.Columns[1].SortOrder = exontrol.EXG2ANTTLib.SortOrderEnum.SortAscending; exontrol.EXG2ANTTLib.Column var_Column = (exg2antt1.Columns.Add("Position") as exontrol.EXG2ANTTLib.Column); var_Column.FormatColumn = "(0:= (1 rpos '')) left ( ( 1:= ( =:0 lfind `.` ) ) != -1 ? =:1 : len(=:0))"; var_Column.Visible = false; exontrol.EXG2ANTTLib.Column var_Column1 = (exg2antt1.Columns.Add("Position") as exontrol.EXG2ANTTLib.Column); var_Column1.FormatColumn = "(1 rpos '') contains '.'"; var_Column1.Visible = false; exg2antt1.ConditionalFormats.Add("(%C13 mod 2) != 0",null).BackColor = Color.FromArgb(240,240,240); exg2antt1.ConditionalFormats.Add("%C14 = 0",null).BackColor = Color.FromArgb(190,190,190); exg2antt1.EndUpdate(); |
1723 |
How can I highlight each group header, with a different background color (method 2)
|
1722 |
How can I highlight each group header ( not-subroup ), with a different background color (method 1)
// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection. private void exg2antt1_AddGroupItem(object sender,int Item) { exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; var_Items.AddBar(Item,"Summary",var_Items.get_CellValue(Item,2),var_Items.get_CellValue(Item,4),null,null); var_Items.DefineSummaryBars(Item,"",-3,""); } //this.exg2antt1.AddGroupItem += new exontrol.EXG2ANTTLib.exg2antt.AddGroupItemEventHandler(this.exg2antt1_AddGroupItem); // AddItem event - Occurs after a new Item has been inserted to Items collection. private void exg2antt1_AddItem(object sender,int Item) { exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; var_Items.AddBar(Item,"Task",var_Items.get_CellValue(Item,2),var_Items.get_CellValue(Item,4),null,null); } //this.exg2antt1.AddItem += new exontrol.EXG2ANTTLib.exg2antt.AddItemEventHandler(this.exg2antt1_AddItem); // LayoutChanged event - Occurs when column's position or column's size is changed. private void exg2antt1_LayoutChanged(object sender) { exg2antt1.Refresh(); } //this.exg2antt1.LayoutChanged += new exontrol.EXG2ANTTLib.exg2antt.LayoutChangedEventHandler(this.exg2antt1_LayoutChanged); exg2antt1.BeginUpdate(); exg2antt1.Chart.FirstVisibleDate = Convert.ToDateTime("9/1/1994",System.Globalization.CultureInfo.GetCultureInfo("en-US")); exg2antt1.Chart.set_PaneWidth(false,312); exg2antt1.BackColorSortBar = exg2antt1.BackColor; exg2antt1.ColumnAutoResize = false; // Add 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' reference to your project. ADODB.Recordset rs = new ADODB.Recordset(); rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access\\misc.accdb",exontrol.ADODB.CursorTypeEnum.adOpenStatic,exontrol.ADODB.LockTypeEnum.adLockOptimistic,0); exg2antt1.DataSource = (rs as ADODB.Recordset); exg2antt1.Items.AllowCellValueToItemBar = true; exg2antt1.Columns[2].set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,1); exg2antt1.Columns[4].set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,2); exg2antt1.SortBarVisible = true; exg2antt1.SortBarCaption = "Drag a <b>column</b> header here to group by that column."; exg2antt1.AllowGroupBy = true; exg2antt1.Columns[1].SortOrder = exontrol.EXG2ANTTLib.SortOrderEnum.SortAscending; exontrol.EXG2ANTTLib.Column var_Column = (exg2antt1.Columns.Add("Position") as exontrol.EXG2ANTTLib.Column); var_Column.FormatColumn = "(0:= (1 rpos '')) left ( ( 1:= ( =:0 lfind `.` ) ) != -1 ? =:1 : len(=:0))"; var_Column.Visible = false; exontrol.EXG2ANTTLib.Column var_Column1 = (exg2antt1.Columns.Add("Position") as exontrol.EXG2ANTTLib.Column); var_Column1.FormatColumn = "(1 rpos '') contains '.'"; var_Column1.Visible = false; exg2antt1.ConditionalFormats.Add("%C14 = 0",null).BackColor = Color.FromArgb(190,190,190); exg2antt1.EndUpdate(); |
1721 |
The BackColorAlternate displays each second row with a different background color. Is it possible to apply a different background color, for each sub-tree, ConditionalFormats, Add
// LayoutChanged event - Occurs when column's position or column's size is changed. private void exg2antt1_LayoutChanged(object sender) { exg2antt1.Refresh(); } //this.exg2antt1.LayoutChanged += new exontrol.EXG2ANTTLib.exg2antt.LayoutChangedEventHandler(this.exg2antt1_LayoutChanged); // Sort event - Fired when the control sorts a column. private void exg2antt1_Sort(object sender) { exg2antt1.Refresh(); } //this.exg2antt1.Sort += new exontrol.EXG2ANTTLib.exg2antt.SortEventHandler(this.exg2antt1_Sort); exg2antt1.BeginUpdate(); exg2antt1.LinesAtRoot = exontrol.EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot; exontrol.EXG2ANTTLib.Column var_Column = (exg2antt1.Columns.Add("P1") as exontrol.EXG2ANTTLib.Column); var_Column.set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox,true); var_Column.PartialCheck = true; exg2antt1.Chart.set_PaneWidth(true,0); exontrol.EXG2ANTTLib.Column var_Column1 = (exg2antt1.Columns.Add("P2") as exontrol.EXG2ANTTLib.Column); var_Column1.set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox,true); var_Column1.PartialCheck = true; exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; int h = var_Items.AddItem("Root 1"); var_Items.InsertItem(h,null,"Child 1"); var_Items.InsertItem(h,null,"Child 2"); var_Items.set_ExpandItem(h,true); h = var_Items.AddItem("Root 2"); var_Items.InsertItem(h,null,"Child 1"); var_Items.InsertItem(h,null,"Child 2"); var_Items.set_ExpandItem(h,true); h = var_Items.AddItem("Root 2"); var_Items.InsertItem(h,null,"Child 1"); var_Items.InsertItem(h,null,"Child 2"); var_Items.set_ExpandItem(h,true); exontrol.EXG2ANTTLib.Column var_Column2 = (exg2antt1.Columns.Add("Position") as exontrol.EXG2ANTTLib.Column); var_Column2.FormatColumn = "(0:= (1 rpos '')) left ( ( 1:= ( =:0 lfind `.` ) ) != -1 ? =:1 : len(=:0))"; var_Column2.Visible = false; exg2antt1.ConditionalFormats.Add("(%C2 mod 2) != 0",null).BackColor = Color.FromArgb(240,240,240); exg2antt1.EndUpdate(); |
1720 |
The BackColorAlternate displays each second row with a different background color. Is it possible to apply a different background color, for 2nd, 3rd, 4th, row, and so on
// AddItem event - Occurs after a new Item has been inserted to Items collection. private void exg2antt1_AddItem(object sender,int Item) { exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; var_Items.AddBar(Item,"Task",var_Items.get_CellValue(Item,2),var_Items.get_CellValue(Item,4),null,null); } //this.exg2antt1.AddItem += new exontrol.EXG2ANTTLib.exg2antt.AddItemEventHandler(this.exg2antt1_AddItem); // LayoutChanged event - Occurs when column's position or column's size is changed. private void exg2antt1_LayoutChanged(object sender) { exg2antt1.Refresh(); } //this.exg2antt1.LayoutChanged += new exontrol.EXG2ANTTLib.exg2antt.LayoutChangedEventHandler(this.exg2antt1_LayoutChanged); exg2antt1.BeginUpdate(); exg2antt1.Chart.FirstVisibleDate = Convert.ToDateTime("9/1/1994",System.Globalization.CultureInfo.GetCultureInfo("en-US")); exg2antt1.Chart.set_PaneWidth(false,312); exg2antt1.ColumnAutoResize = false; // Add 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' reference to your project. ADODB.Recordset rs = new ADODB.Recordset(); rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access\\misc.accdb",exontrol.ADODB.CursorTypeEnum.adOpenStatic,exontrol.ADODB.LockTypeEnum.adLockOptimistic,0); exg2antt1.DataSource = (rs as ADODB.Recordset); exg2antt1.Items.AllowCellValueToItemBar = true; exg2antt1.Columns[2].set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,1); exg2antt1.Columns[4].set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,2); exg2antt1.Columns[1].SortOrder = exontrol.EXG2ANTTLib.SortOrderEnum.SortAscending; exontrol.EXG2ANTTLib.Column var_Column = (exg2antt1.Columns.Add("Position") as exontrol.EXG2ANTTLib.Column); var_Column.FormatColumn = "1 apos ''"; var_Column.Visible = false; exg2antt1.ConditionalFormats.Add("(%C13 mod 5) = 1",null).BackColor = Color.FromArgb(128,128,128); exg2antt1.ConditionalFormats.Add("(%C13 mod 5) = 2",null).BackColor = Color.FromArgb(164,164,164); exg2antt1.ConditionalFormats.Add("(%C13 mod 5) = 3",null).BackColor = Color.FromArgb(190,190,190); exg2antt1.ConditionalFormats.Add("(%C13 mod 5) = 4",null).BackColor = Color.FromArgb(240,240,240); exg2antt1.EndUpdate(); |
1719 |
The BackColorAlternate displays each second row with a different background color. The question I have it is possible to apply a different background color for 3rd, 4th, row, and so on
// AddItem event - Occurs after a new Item has been inserted to Items collection. private void exg2antt1_AddItem(object sender,int Item) { exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; var_Items.AddBar(Item,"Task",var_Items.get_CellValue(Item,2),var_Items.get_CellValue(Item,4),null,null); } //this.exg2antt1.AddItem += new exontrol.EXG2ANTTLib.exg2antt.AddItemEventHandler(this.exg2antt1_AddItem); // LayoutChanged event - Occurs when column's position or column's size is changed. private void exg2antt1_LayoutChanged(object sender) { exg2antt1.Refresh(); } //this.exg2antt1.LayoutChanged += new exontrol.EXG2ANTTLib.exg2antt.LayoutChangedEventHandler(this.exg2antt1_LayoutChanged); exg2antt1.BeginUpdate(); exg2antt1.Chart.FirstVisibleDate = Convert.ToDateTime("9/1/1994",System.Globalization.CultureInfo.GetCultureInfo("en-US")); exg2antt1.Chart.set_PaneWidth(false,312); exg2antt1.ColumnAutoResize = false; // Add 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' reference to your project. ADODB.Recordset rs = new ADODB.Recordset(); rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access\\misc.accdb",exontrol.ADODB.CursorTypeEnum.adOpenStatic,exontrol.ADODB.LockTypeEnum.adLockOptimistic,0); exg2antt1.DataSource = (rs as ADODB.Recordset); exg2antt1.Items.AllowCellValueToItemBar = true; exg2antt1.Columns[2].set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,1); exg2antt1.Columns[4].set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,2); exg2antt1.Columns[1].SortOrder = exontrol.EXG2ANTTLib.SortOrderEnum.SortAscending; exontrol.EXG2ANTTLib.Column var_Column = (exg2antt1.Columns.Add("Position") as exontrol.EXG2ANTTLib.Column); var_Column.FormatColumn = "1 apos ''"; var_Column.Visible = false; exg2antt1.ConditionalFormats.Add("(%C13 mod 4) = 0",null).BackColor = Color.FromArgb(240,240,240); exg2antt1.EndUpdate(); |
1718 |
The BackColorAlternate looks fine for flat tables, but how about using it when displaying a hierarchy/tree, like grouping rows. The sample alternate colors for each group found
// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection. private void exg2antt1_AddGroupItem(object sender,int Item) { exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; var_Items.AddBar(Item,"Summary",var_Items.get_CellValue(Item,2),var_Items.get_CellValue(Item,4),null,null); var_Items.DefineSummaryBars(Item,"",-3,""); } //this.exg2antt1.AddGroupItem += new exontrol.EXG2ANTTLib.exg2antt.AddGroupItemEventHandler(this.exg2antt1_AddGroupItem); // AddItem event - Occurs after a new Item has been inserted to Items collection. private void exg2antt1_AddItem(object sender,int Item) { exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; var_Items.AddBar(Item,"Task",var_Items.get_CellValue(Item,2),var_Items.get_CellValue(Item,4),null,null); } //this.exg2antt1.AddItem += new exontrol.EXG2ANTTLib.exg2antt.AddItemEventHandler(this.exg2antt1_AddItem); // LayoutChanged event - Occurs when column's position or column's size is changed. private void exg2antt1_LayoutChanged(object sender) { exg2antt1.Refresh(); } //this.exg2antt1.LayoutChanged += new exontrol.EXG2ANTTLib.exg2antt.LayoutChangedEventHandler(this.exg2antt1_LayoutChanged); exg2antt1.BeginUpdate(); exg2antt1.Chart.FirstVisibleDate = Convert.ToDateTime("9/1/1994",System.Globalization.CultureInfo.GetCultureInfo("en-US")); exg2antt1.Chart.set_PaneWidth(false,312); exg2antt1.BackColorSortBar = exg2antt1.BackColor; exg2antt1.ColumnAutoResize = false; // Add 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' reference to your project. ADODB.Recordset rs = new ADODB.Recordset(); rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access\\misc.accdb",exontrol.ADODB.CursorTypeEnum.adOpenStatic,exontrol.ADODB.LockTypeEnum.adLockOptimistic,0); exg2antt1.DataSource = (rs as ADODB.Recordset); exg2antt1.Items.AllowCellValueToItemBar = true; exg2antt1.Columns[2].set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,1); exg2antt1.Columns[4].set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,2); exg2antt1.SortBarVisible = true; exg2antt1.SortBarCaption = "Drag a <b>column</b> header here to group by that column."; exg2antt1.AllowGroupBy = true; exg2antt1.Columns[1].SortOrder = exontrol.EXG2ANTTLib.SortOrderEnum.SortAscending; exontrol.EXG2ANTTLib.Column var_Column = (exg2antt1.Columns.Add("Position") as exontrol.EXG2ANTTLib.Column); var_Column.FormatColumn = "(0:= (1 rpos '')) left ( ( 1:= ( =:0 lfind `.` ) ) != -1 ? =:1 : len(=:0))"; var_Column.Visible = false; exg2antt1.ConditionalFormats.Add("(%C13 mod 2) != 0",null).BackColor = Color.FromArgb(240,240,240); exg2antt1.EndUpdate(); |
1717 |
How do I show the chart's labels in 24-hour clock format
exontrol.EXG2ANTTLib.Chart var_Chart = exg2antt1.Chart; var_Chart.set_PaneWidth(false,0); var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.LevelCount = 3; exontrol.EXG2ANTTLib.Level var_Level = var_Chart.get_Level(0); var_Level.Label = "<%mmm%> <%d%>, <%yyyy%>"; var_Level.Alignment = exontrol.EXG2ANTTLib.AlignmentEnum.exHOutside | exontrol.EXG2ANTTLib.AlignmentEnum.CenterAlignment; var_Level.Unit = exontrol.EXG2ANTTLib.UnitEnum.exDay; exontrol.EXG2ANTTLib.Level var_Level1 = var_Chart.get_Level(1); var_Level1.Label = "<b><%h%>:00</b>"; var_Level1.Alignment = exontrol.EXG2ANTTLib.AlignmentEnum.CenterAlignment; var_Level1.Unit = exontrol.EXG2ANTTLib.UnitEnum.exHour; var_Level1.DrawTickLines = exontrol.EXG2ANTTLib.LevelLineEnum.exLevelDefaultLine; var_Level1.DrawGridLines = true; exontrol.EXG2ANTTLib.Level var_Level2 = var_Chart.get_Level(2); var_Level2.Label = "<%nn%>"; var_Level2.Unit = exontrol.EXG2ANTTLib.UnitEnum.exMinute; var_Level2.Count = 15; var_Chart.ScrollTo(Convert.ToDateTime("1/1/2001 8:30:00",System.Globalization.CultureInfo.GetCultureInfo("en-US")),0); |
1716 |
How do I show the chart's labels in 12-hour clock format
exontrol.EXG2ANTTLib.Chart var_Chart = exg2antt1.Chart; var_Chart.set_PaneWidth(false,0); var_Chart.FirstVisibleDate = Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.LevelCount = 3; exontrol.EXG2ANTTLib.Level var_Level = var_Chart.get_Level(0); var_Level.Label = "<%mmm%> <%d%>, <%yyyy%>"; var_Level.Alignment = exontrol.EXG2ANTTLib.AlignmentEnum.exHOutside | exontrol.EXG2ANTTLib.AlignmentEnum.CenterAlignment; var_Level.Unit = exontrol.EXG2ANTTLib.UnitEnum.exDay; exontrol.EXG2ANTTLib.Level var_Level1 = var_Chart.get_Level(1); var_Level1.Label = "<b><%h%>:00</b> <%AM/PM%>"; var_Level1.Alignment = exontrol.EXG2ANTTLib.AlignmentEnum.CenterAlignment; var_Level1.Unit = exontrol.EXG2ANTTLib.UnitEnum.exHour; var_Level1.DrawTickLines = exontrol.EXG2ANTTLib.LevelLineEnum.exLevelDefaultLine; var_Level1.DrawGridLines = true; exontrol.EXG2ANTTLib.Level var_Level2 = var_Chart.get_Level(2); var_Level2.Label = "<%nn%>"; var_Level2.Unit = exontrol.EXG2ANTTLib.UnitEnum.exMinute; var_Level2.Count = 15; var_Chart.ScrollTo(Convert.ToDateTime("1/1/2001 8:30:00",System.Globalization.CultureInfo.GetCultureInfo("en-US")),0); |
1715 |
I would like to avoid manual typing in the date-cell because user often type wrong things (no decimal points and so on) and so the todays-date is generated for the cell. What can be done
// KeyPress event - Occurs when the user presses and releases an ANSI key. private void exg2antt1_KeyPress(object sender,ref short KeyAscii) { System.Diagnostics.Debug.Print( "if .Editying != 0 then" ); System.Diagnostics.Debug.Print( exg2antt1.Editing.ToString() ); KeyAscii = 0; } //this.exg2antt1.KeyPress += new exontrol.EXG2ANTTLib.exg2antt.KeyPressEventHandler(this.exg2antt1_KeyPress); exg2antt1.BeginUpdate(); exontrol.EXG2ANTTLib.Columns var_Columns = exg2antt1.Columns; var_Columns.Add("Tasks"); exontrol.EXG2ANTTLib.Column var_Column = (var_Columns.Add("Start") as exontrol.EXG2ANTTLib.Column); var_Column.set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,1); var_Column.Editor.EditType = exontrol.EXG2ANTTLib.EditTypeEnum.DateType; exontrol.EXG2ANTTLib.Column var_Column1 = (var_Columns.Add("End") as exontrol.EXG2ANTTLib.Column); var_Column1.set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,2); var_Column1.Editor.EditType = exontrol.EXG2ANTTLib.EditTypeEnum.DateType; exontrol.EXG2ANTTLib.Chart var_Chart = exg2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("9/20/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.AllowLinkBars = true; var_Chart.AllowCreateBar = exontrol.EXG2ANTTLib.CreateBarEnum.exNoCreateBar; var_Chart.LevelCount = 2; var_Chart.set_PaneWidth(false,196); exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; var_Items.AllowCellValueToItemBar = true; var_Items.AddBar(var_Items.AddItem("Task 1"),"Task",Convert.ToDateTime("9/21/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("9/24/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.AddBar(var_Items.AddItem("Task 2"),"Task",Convert.ToDateTime("9/22/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("9/25/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.AddBar(var_Items.AddItem("Task 3"),"Task",Convert.ToDateTime("9/23/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("9/26/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); exg2antt1.EndUpdate(); |
1714 |
When a Day, Week etc is clicked how can we make it centre/zoom the chart to cover all the bars
// OverviewZoom event - Occurs once the user selects a new time scale unit in the overview zoom area. private void exg2antt1_OverviewZoom(object sender) { exontrol.EXG2ANTTLib.Chart var_Chart = exg2antt1.Chart; var_Chart.ScrollTo(Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),1); System.Diagnostics.Debug.Print( "Start" ); System.Diagnostics.Debug.Print( var_Chart.StartPrintDate.ToString() ); System.Diagnostics.Debug.Print( "End" ); System.Diagnostics.Debug.Print( var_Chart.EndPrintDate.ToString() ); } //this.exg2antt1.OverviewZoom += new exontrol.EXG2ANTTLib.exg2antt.OverviewZoomEventHandler(this.exg2antt1_OverviewZoom); exg2antt1.BeginUpdate(); exontrol.EXG2ANTTLib.Chart var_Chart = exg2antt1.Chart; var_Chart.set_PaneWidth(false,128); var_Chart.LevelCount = 2; var_Chart.OverviewVisible = exontrol.EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowAllVisible; var_Chart.AllowOverviewZoom = exontrol.EXG2ANTTLib.OverviewZoomEnum.exAlwaysZoom; var_Chart.set_Label(exontrol.EXG2ANTTLib.UnitEnum.exSecond,""); var_Chart.set_Label(exontrol.EXG2ANTTLib.UnitEnum.exMinute,""); var_Chart.set_Label(exontrol.EXG2ANTTLib.UnitEnum.exHour,""); var_Chart.UnitScale = exontrol.EXG2ANTTLib.UnitEnum.exDay; var_Chart.ScrollTo(Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),1); var_Chart.MarkTimeZone("zone",Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/2/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),10516548,null); exg2antt1.Columns.Add("Default"); exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; var_Items.AddBar(var_Items.AddItem("Item 1"),"Task",Convert.ToDateTime("12/15/2000",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/10/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); var_Items.AddBar(var_Items.AddItem("Item 2"),"Task",Convert.ToDateTime("1/1/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("1/5/2001",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null); exg2antt1.EndUpdate(); |
1713 |
The first time we run the application, the day label headers looks different then pressing Week and then Day again on the control's overview part. How do we make to show the header in the same format
exontrol.EXG2ANTTLib.Chart var_Chart = exg2antt1.Chart; var_Chart.set_PaneWidth(false,128); var_Chart.LevelCount = 2; var_Chart.OverviewVisible = exontrol.EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowAllVisible; var_Chart.AllowOverviewZoom = exontrol.EXG2ANTTLib.OverviewZoomEnum.exAlwaysZoom; var_Chart.set_Label(exontrol.EXG2ANTTLib.UnitEnum.exSecond,""); var_Chart.set_Label(exontrol.EXG2ANTTLib.UnitEnum.exMinute,""); var_Chart.set_Label(exontrol.EXG2ANTTLib.UnitEnum.exHour,""); var_Chart.UnitScale = exontrol.EXG2ANTTLib.UnitEnum.exDay; |
1712 |
How to sort numerically by columns
exg2antt1.BeginUpdate(); (exg2antt1.Columns.Add("Numeric") as exontrol.EXG2ANTTLib.Column).SortType = exontrol.EXG2ANTTLib.SortTypeEnum.SortNumeric; exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; var_Items.AddItem(1); var_Items.AddItem(2); var_Items.AddItem(12); var_Items.AddItem(22); exg2antt1.Columns[0].SortOrder = exontrol.EXG2ANTTLib.SortOrderEnum.SortAscending; exg2antt1.EndUpdate(); |
1711 |
The control does not ensure the item to fit the control's client area once the user clicks the cell's button or check box. What can be done
// MouseDown event - Occurs when the user presses a mouse button. private void exg2antt1_MouseDownEvent(object sender,short Button,short Shift,int X,int Y) { // Items.EnsureVisibleItem(ItemFromPoint(-1,-1,c,hit)) } //this.exg2antt1.MouseDownEvent += new exontrol.EXG2ANTTLib.exg2antt.MouseDownEventHandler(this.exg2antt1_MouseDownEvent); exg2antt1.BeginUpdate(); exg2antt1.TreeColumnIndex = -1; exg2antt1.SelForeColor = exg2antt1.ForeColor; exontrol.EXG2ANTTLib.Column var_Column = (exg2antt1.Columns.Add("Buttons") as exontrol.EXG2ANTTLib.Column); var_Column.Alignment = exontrol.EXG2ANTTLib.AlignmentEnum.CenterAlignment; var_Column.set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellHasButton,true); exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; var_Items.AddItem("Button A"); var_Items.AddItem("Button B"); var_Items.AddItem("Button C"); exg2antt1.EndUpdate(); |
1710 |
How do I arrange the levels when the user changes the scale using the control's overview part
|
1709 |
I am using AllowGroupBy, the question is it is possible to add summary bars for child item, when user do grouping
// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection. private void exg2antt1_AddGroupItem(object sender,int Item) { exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; var_Items.AddBar(Item,"Summary",var_Items.get_CellValue(Item,2),var_Items.get_CellValue(Item,4),null,null); var_Items.DefineSummaryBars(Item,"",-3,""); } //this.exg2antt1.AddGroupItem += new exontrol.EXG2ANTTLib.exg2antt.AddGroupItemEventHandler(this.exg2antt1_AddGroupItem); // AddItem event - Occurs after a new Item has been inserted to Items collection. private void exg2antt1_AddItem(object sender,int Item) { exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; var_Items.AddBar(Item,"Task",var_Items.get_CellValue(Item,2),var_Items.get_CellValue(Item,4),null,null); } //this.exg2antt1.AddItem += new exontrol.EXG2ANTTLib.exg2antt.AddItemEventHandler(this.exg2antt1_AddItem); exg2antt1.BeginUpdate(); exg2antt1.Chart.FirstVisibleDate = Convert.ToDateTime("9/1/1994",System.Globalization.CultureInfo.GetCultureInfo("en-US")); exg2antt1.BackColorSortBar = exg2antt1.BackColor; exg2antt1.ColumnAutoResize = false; // Add 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' reference to your project. ADODB.Recordset rs = new ADODB.Recordset(); rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access\\misc.accdb",exontrol.ADODB.CursorTypeEnum.adOpenStatic,exontrol.ADODB.LockTypeEnum.adLockOptimistic,0); exg2antt1.DataSource = (rs as ADODB.Recordset); exg2antt1.SortBarVisible = true; exg2antt1.SortBarCaption = "Drag a <b>column</b> header here to group by that column."; exg2antt1.AllowGroupBy = true; exg2antt1.Columns[1].SortOrder = exontrol.EXG2ANTTLib.SortOrderEnum.SortAscending; exg2antt1.EndUpdate(); |
1708 |
I noticed that when grouping on a field, its details are always expanded. Is it possible to show collapsed by default (method 3)
|
1707 |
I noticed that when grouping on a field, its details are always expanded. Is it possible to show collapsed by default (method 2)
// AddItem event - Occurs after a new Item has been inserted to Items collection. private void exg2antt1_AddItem(object sender,int Item) { exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; var_Items.AddBar(Item,"Task",var_Items.get_CellValue(Item,2),var_Items.get_CellValue(Item,4),null,null); } //this.exg2antt1.AddItem += new exontrol.EXG2ANTTLib.exg2antt.AddItemEventHandler(this.exg2antt1_AddItem); exg2antt1.BeginUpdate(); exg2antt1.Chart.FirstVisibleDate = Convert.ToDateTime("9/1/1994",System.Globalization.CultureInfo.GetCultureInfo("en-US")); exg2antt1.BackColorSortBar = exg2antt1.BackColor; exg2antt1.ColumnAutoResize = false; // Add 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' reference to your project. ADODB.Recordset rs = new ADODB.Recordset(); rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access\\misc.accdb",exontrol.ADODB.CursorTypeEnum.adOpenStatic,exontrol.ADODB.LockTypeEnum.adLockOptimistic,0); exg2antt1.DataSource = (rs as ADODB.Recordset); exg2antt1.SortBarVisible = true; exg2antt1.SortBarCaption = "Drag a <b>column</b> header here to group by that column."; exg2antt1.AllowGroupBy = true; exg2antt1.Columns[1].SortOrder = exontrol.EXG2ANTTLib.SortOrderEnum.SortAscending; exg2antt1.EndUpdate(); exg2antt1.BeginUpdate(); exg2antt1.EnsureVisibleColumn(0); exg2antt1.Items.set_ExpandItem(0,false); exg2antt1.EndUpdate(); |
1706 |
I noticed that when grouping on a field, its details are always expanded. Is it possible to show collapsed by default (method 1)
|
1705 |
Is there a possibility to expand / collapse all groups (or group by group) at runtime with a method (equivalent to pressing the + or - button in the group header)
// AddItem event - Occurs after a new Item has been inserted to Items collection. private void exg2antt1_AddItem(object sender,int Item) { exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; var_Items.AddBar(Item,"Task",var_Items.get_CellValue(Item,2),var_Items.get_CellValue(Item,4),null,null); } //this.exg2antt1.AddItem += new exontrol.EXG2ANTTLib.exg2antt.AddItemEventHandler(this.exg2antt1_AddItem); exg2antt1.BeginUpdate(); exg2antt1.Chart.FirstVisibleDate = Convert.ToDateTime("9/1/1994",System.Globalization.CultureInfo.GetCultureInfo("en-US")); exg2antt1.BackColorSortBar = exg2antt1.BackColor; exg2antt1.ColumnAutoResize = false; // Add 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' reference to your project. ADODB.Recordset rs = new ADODB.Recordset(); rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access\\misc.accdb",exontrol.ADODB.CursorTypeEnum.adOpenStatic,exontrol.ADODB.LockTypeEnum.adLockOptimistic,0); exg2antt1.DataSource = (rs as ADODB.Recordset); exg2antt1.SortBarVisible = true; exg2antt1.SortBarCaption = "Drag a <b>column</b> header here to group by that column."; exg2antt1.AllowGroupBy = true; exg2antt1.Columns[1].SortOrder = exontrol.EXG2ANTTLib.SortOrderEnum.SortAscending; exg2antt1.EndUpdate(); exg2antt1.EnsureVisibleColumn(0); exg2antt1.BeginUpdate(); exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; var_Items.set_ExpandItem(var_Items.get_RootItem(0),false); var_Items.set_ExpandItem(var_Items.get_RootItem(1),false); var_Items.set_ExpandItem(var_Items.get_RootItem(2),false); exg2antt1.EndUpdate(); |
1704 |
Is there a possibility to expand / collapse all groups (or group by group) at runtime with a method (equivalent to pressing the + or - button in the group header)
// AddItem event - Occurs after a new Item has been inserted to Items collection. private void exg2antt1_AddItem(object sender,int Item) { exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; var_Items.AddBar(Item,"Task",var_Items.get_CellValue(Item,2),var_Items.get_CellValue(Item,4),null,null); } //this.exg2antt1.AddItem += new exontrol.EXG2ANTTLib.exg2antt.AddItemEventHandler(this.exg2antt1_AddItem); exg2antt1.BeginUpdate(); exg2antt1.Chart.FirstVisibleDate = Convert.ToDateTime("9/1/1994",System.Globalization.CultureInfo.GetCultureInfo("en-US")); exg2antt1.BackColorSortBar = exg2antt1.BackColor; exg2antt1.ColumnAutoResize = false; // Add 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' reference to your project. ADODB.Recordset rs = new ADODB.Recordset(); rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access\\misc.accdb",exontrol.ADODB.CursorTypeEnum.adOpenStatic,exontrol.ADODB.LockTypeEnum.adLockOptimistic,0); exg2antt1.DataSource = (rs as ADODB.Recordset); exg2antt1.SortBarVisible = true; exg2antt1.SortBarCaption = "Drag a <b>column</b> header here to group by that column."; exg2antt1.AllowGroupBy = true; exg2antt1.Columns[1].SortOrder = exontrol.EXG2ANTTLib.SortOrderEnum.SortAscending; exg2antt1.EndUpdate(); exg2antt1.BeginUpdate(); exg2antt1.EnsureVisibleColumn(0); exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; var_Items.set_ExpandItem(var_Items.FirstVisibleItem,false); exg2antt1.EndUpdate(); |
1703 |
How can I move automatically a bar once another is moved ( non-working bars )
exg2antt1.BeginUpdate(); exg2antt1.MarkSearchColumn = false; exg2antt1.OnResizeControl = exontrol.EXG2ANTTLib.OnResizeControlEnum.exResizeChart; exg2antt1.Columns.Add("Tasks"); (exg2antt1.Columns.Add("Start") as exontrol.EXG2ANTTLib.Column).Visible = false; (exg2antt1.Columns.Add("End") as exontrol.EXG2ANTTLib.Column).Visible = false; exontrol.EXG2ANTTLib.Chart var_Chart = exg2antt1.Chart; var_Chart.FirstVisibleDate = Convert.ToDateTime("9/20/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US")); var_Chart.set_PaneWidth(false,64); exontrol.EXG2ANTTLib.Bar var_Bar = var_Chart.Bars.Add("Task:Split"); var_Bar.Shortcut = "TSplit"; var_Bar.set_Def(exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarKeepWorkingCount,true); exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; int h = var_Items.AddItem("Project"); var_Items.set_CellValue(h,1,Convert.ToDateTime("9/22/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); var_Items.set_CellValue(h,2,Convert.ToDateTime("10/3/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); var_Items.AddBar(h,"Summary",var_Items.get_CellValue(h,1),var_Items.get_CellValue(h,2),null,null); int h1 = var_Items.InsertItem(h,null,"Task 1"); var_Items.set_CellValue(h1,1,var_Items.get_CellValue(h,1)); var_Items.set_CellValue(h1,2,Convert.ToDateTime("9/26/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); var_Items.AddBar(h1,"TSplit",var_Items.get_CellValue(h1,1),var_Items.get_CellValue(h1,2),null,null); int h2 = var_Items.InsertItem(h,null,"Task 2"); var_Items.set_CellValue(h2,1,var_Items.get_CellValue(h1,2)); var_Items.set_CellValue(h2,2,Convert.ToDateTime("9/28/2006",System.Globalization.CultureInfo.GetCultureInfo("en-US"))); var_Items.AddBar(h2,"TSplit",var_Items.get_CellValue(h2,1),var_Items.get_CellValue(h2,2),null,null); var_Items.AddLink("L1",h1,"",h2,""); int h3 = var_Items.InsertItem(h,null,"Task 3"); var_Items.set_CellValue(h3,1,var_Items.get_CellValue(h2,2)); var_Items.set_CellValue(h3,2,var_Items.get_CellValue(h,2)); var_Items.AddBar(h3,"TSplit",var_Items.get_CellValue(h3,1),var_Items.get_CellValue(h3,2),null,null); var_Items.AddLink("L2",h2,"",h3,""); var_Items.GroupBars(h1,"",false,h2,"",true,7,null); var_Items.GroupBars(h2,"",false,h3,"",true,7,null); var_Items.DefineSummaryBars(h,"",h1,""); var_Items.DefineSummaryBars(h,"",h2,""); var_Items.DefineSummaryBars(h,"",h3,""); var_Items.set_ExpandItem(h,true); var_Items.set_ItemBold(h,true); exg2antt1.EndUpdate(); |
1702 |
How can I get notified once the user expands a column
// LayoutChanged event - Occurs when column's position or column's size is changed. private void exg2antt1_LayoutChanged(object sender) { System.Diagnostics.Debug.Print( "Column-Expanded" ); System.Diagnostics.Debug.Print( exg2antt1.Columns["C0"].Expanded.ToString() ); } //this.exg2antt1.LayoutChanged += new exontrol.EXG2ANTTLib.exg2antt.LayoutChangedEventHandler(this.exg2antt1_LayoutChanged); exg2antt1.BeginUpdate(); exg2antt1.ShowFocusRect = false; exg2antt1.ColumnAutoResize = false; exg2antt1.DrawGridLines = exontrol.EXG2ANTTLib.GridLinesEnum.exAllLines; exg2antt1.BackColorLevelHeader = exg2antt1.BackColor; exontrol.EXG2ANTTLib.Columns var_Columns = exg2antt1.Columns; exontrol.EXG2ANTTLib.Column var_Column = (var_Columns.Add("C0") as exontrol.EXG2ANTTLib.Column); var_Column.ExpandColumns = "0,1,2"; var_Column.DisplayExpandButton = true; var_Columns.Add("C1"); var_Columns.Add("C2"); exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; int h = var_Items.AddItem("Cell 0.0"); var_Items.set_CellValue(h,1,"Cell 0.1"); var_Items.set_CellValue(h,2,"Cell 0.2"); h = var_Items.AddItem("Cell 1.0"); var_Items.set_CellValue(h,1,"Cell 1.1"); var_Items.set_CellValue(h,2,"Cell 1.2"); exg2antt1.EndUpdate(); |
1701 |
I am using expandable headers, the question is how I can display the column itself, not just the child columns
exg2antt1.BeginUpdate(); exg2antt1.ColumnAutoResize = false; exg2antt1.DrawGridLines = exontrol.EXG2ANTTLib.GridLinesEnum.exAllLines; exg2antt1.BackColorLevelHeader = exg2antt1.BackColor; exontrol.EXG2ANTTLib.Columns var_Columns = exg2antt1.Columns; exontrol.EXG2ANTTLib.Column var_Column = (var_Columns.Add("C0") as exontrol.EXG2ANTTLib.Column); var_Column.ExpandColumns = "0,1,2"; var_Column.DisplayExpandButton = true; var_Columns.Add("C1"); var_Columns.Add("C2"); exontrol.EXG2ANTTLib.Items var_Items = exg2antt1.Items; int h = var_Items.AddItem("Cell 0.0"); var_Items.set_CellValue(h,1,"Cell 0.1"); var_Items.set_CellValue(h,2,"Cell 0.2"); h = var_Items.AddItem("Cell 1.0"); var_Items.set_CellValue(h,1,"Cell 1.1"); var_Items.set_CellValue(h,2,"Cell 1.2"); exg2antt1.EndUpdate(); |